<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML ><HEAD ><TITLE >st driver</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="The Linux 2.4 SCSI subsystem HOWTO" HREF="index.html"><LINK REL="UP" TITLE="Compile options and System calls including ioctls" HREF="compileopt.html"><LINK REL="PREVIOUS" TITLE="sr driver" HREF="cosr.html"><LINK REL="NEXT" TITLE="sg driver" HREF="cosg.html"></HEAD ><BODY CLASS="sect1" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >The Linux 2.4 SCSI subsystem HOWTO</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="cosr.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" >Appendix E. Compile options and System calls including ioctls</TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="cosg.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="sect1" ><H1 CLASS="sect1" ><A NAME="cost" ></A >E.4. st driver</H1 ><P > </P ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="costco" ></A >E.4.1. st compile options</H2 ><P > Most of the following compile options can be overridden with boot/module parameters and/or runtime configuration (i.e. ioctls). </P ><P > The following parameters are defined in linux/drivers/scsi/st_options.h <TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="programlisting" > ST_NOWAIT {0} ST_IN_FILE_POS {0} ST_RECOVERED_WRITE_FATAL {0} ST_DEFAULT_BLOCK {0} ST_BUFFER_BLOCKS {32} ST_WRITE_THRESHOLD_BLOCKS {30} ST_MAX_BUFFERS {4} ST_MAX_SG {16} ST_FIRST_SG {8} ST_FIRST_ORDER {5} ST_TWO_FM {0} ST_BUFFER_WRITES {1} ST_ASYNC_WRITES {1} ST_READ_AHEAD {1} ST_AUTO_LOCK {0} ST_FAST_MTEOM {0} ST_SCSI2LOGICAL {0} ST_SYSV {0} </PRE ></FONT ></TD ></TR ></TABLE > </P ><P > The following parameters are defined in linux/drivers/scsi/st.c <TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="programlisting" > ST_TIMEOUT {900*HZ} ST_LONG_TIMEOUT {14000*HZ} </PRE ></FONT ></TD ></TR ></TABLE > </P ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="costio" ></A >E.4.2. st ioctls and user interface</H2 ><P > The Linux tape interface is defined in <TT CLASS="filename" >/usr/src/linux/include/linux/mtio.h </TT >. </P ><P > The following ioctl()s are listed in alphabetical order with a brief explanation to the right. [See st documentation (especially <B CLASS="command" >man 4 st</B >) for more details.] <TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="programlisting" > MTIOCTOP [execute tape commands and set drive/driver options] MTIOCGET [get the status of the drive] MTIOCPOS [get the current tape location] open() O_RDONLY, O_RDWR close() read() write() ioctl() </PRE ></FONT ></TD ></TR ></TABLE > </P ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="cosr.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="cosg.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >sr driver</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="compileopt.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >sg driver</TD ></TR ></TABLE ></DIV ></BODY ></HTML >