<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML ><HEAD ><TITLE >Compile options and System calls including ioctls</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="PREVIOUS" TITLE="Performance, Test and Debugging tools" HREF="perform.html"><LINK REL="NEXT" TITLE="Mid level" HREF="coml.html"></HEAD ><BODY CLASS="appendix" 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="perform.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="coml.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="appendix" ><H1 ><A NAME="compileopt" ></A >Appendix E. Compile options and System calls including ioctls</H1 ><DIV CLASS="TOC" ><DL ><DT ><B >Table of Contents</B ></DT ><DT >E.1. <A HREF="coml.html" >Mid level</A ></DT ><DD ><DL ><DT >E.1.1. <A HREF="coml.html#comlco" >Mid level compile options</A ></DT ><DT >E.1.2. <A HREF="coml.html#comlio" >Mid level ioctls</A ></DT ></DL ></DD ><DT >E.2. <A HREF="cosd.html" >sd driver</A ></DT ><DD ><DL ><DT >E.2.1. <A HREF="cosd.html#cosdco" >sd compile options</A ></DT ><DT >E.2.2. <A HREF="cosd.html#cosdio" >sd ioctls and user interface</A ></DT ></DL ></DD ><DT >E.3. <A HREF="cosr.html" >sr driver</A ></DT ><DD ><DL ><DT >E.3.1. <A HREF="cosr.html#cosrco" >sr compile options</A ></DT ><DT >E.3.2. <A HREF="cosr.html#cosrio" >sr ioctls and user interface</A ></DT ></DL ></DD ><DT >E.4. <A HREF="cost.html" >st driver</A ></DT ><DD ><DL ><DT >E.4.1. <A HREF="cost.html#costco" >st compile options</A ></DT ><DT >E.4.2. <A HREF="cost.html#costio" >st ioctls and user interface</A ></DT ></DL ></DD ><DT >E.5. <A HREF="cosg.html" >sg driver</A ></DT ><DD ><DL ><DT >E.5.1. <A HREF="cosg.html#cosgco" >sg compile options</A ></DT ><DT >E.5.2. <A HREF="cosg.html#cosgio" >sg ioctls and user interface</A ></DT ></DL ></DD ></DL ></DIV ><P > The compile options in this appendix are those which a system administrator might conceivably want to change. Naturally the defaults are chosen so the vast majority of users will not need to modify anything. In some cases setting kernel build time options, kernel boot time parameters or module load parameters has the same effect as changing a driver compile time option. </P ><P > System calls act as the interface between application programs and the kernel and its drivers. In the case of the layered driver architecture that the SCSI subsystem uses, the upper layer drivers handle most of the system calls. </P ><P > The SCSI subsystem has a "bubble down" ioctl structure. First the upper level driver associated with the open file descriptor attempts to decode the ioctl. If it doesn't recognize it then the ioctl is passed down to the mid level. If the mid level doesn't recognize it then the ioctl is passed down to the lower level driver associated with the file descriptor. If the lower level driver doesn't recognize it then a EINVAL error is generated. </P ><P > Some ioctls are dispatched to related subsystems. </P ></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="perform.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="coml.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >Performance, Test and Debugging tools</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" > </TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >Mid level</TD ></TR ></TABLE ></DIV ></BODY ></HTML >