<HTML ><HEAD ><TITLE >driver_status</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+ "><LINK REL="HOME" TITLE="The Linux SCSI Generic (sg) HOWTO" HREF="index.html"><LINK REL="UP" TITLE="The sg_io_hdr_t structure in detail" HREF="sg_io_hdr_t.html"><LINK REL="PREVIOUS" TITLE="host_status" HREF="x291.html"><LINK REL="NEXT" TITLE="resid" HREF="x356.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 SCSI Generic (sg) HOWTO</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="x291.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" >Chapter 6. The sg_io_hdr_t structure in detail</TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="x356.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="SECT1" ><H1 CLASS="SECT1" ><A NAME="AEN322">6.19. driver_status</H1 ><P >One driver can potentially control several host adapters. For example Advansys provide one Linux adapter driver that controls all adapters made by that company - if 2 of more Advansys adapters are in 1 machine, then 1 driver controls both. When ('driver_status' & SG_ERR_DRIVER_SENSE) is true the 'sense_buffer' is also output. The 'driver_status' field has the following values whose #defines mimic those which are only visible within the kernel (with the "SG_ERR_" removed from the front of each define). A copy of these defines can be found in sg_err.h (see the utilities section): <P ></P ><UL ><LI ><P > SG_ERR_DRIVER_OK [0x00] Typically no suggestion</P ></LI ><LI ><P > SG_ERR_DRIVER_BUSY [0x01]</P ></LI ><LI ><P > SG_ERR_DRIVER_SOFT [0x02]</P ></LI ><LI ><P > SG_ERR_DRIVER_MEDIA [0x03]</P ></LI ><LI ><P > SG_ERR_DRIVER_ERROR [0x04]</P ></LI ><LI ><P > SG_ERR_DRIVER_INVALID [0x05]</P ></LI ><LI ><P > SG_ERR_DRIVER_TIMEOUT [0x06] Adapter driver is unable to control the SCSI bus to its is setting its devices offline (and giving up)</P ></LI ><LI ><P > SG_ERR_DRIVER_HARD [0x07]</P ></LI ><LI ><P > SG_ERR_DRIVER_SENSE [0x08] Implies sense_buffer output</P ></LI ><LI ><P > above status 'or'ed with one of the following suggestions</P ></LI ><LI ><P > SG_ERR_SUGGEST_RETRY [0x10]</P ></LI ><LI ><P > SG_ERR_SUGGEST_ABORT [0x20]</P ></LI ><LI ><P > SG_ERR_SUGGEST_REMAP [0x30]</P ></LI ><LI ><P > SG_ERR_SUGGEST_DIE [0x40]</P ></LI ><LI ><P > SG_ERR_SUGGEST_SENSE [0x80]</P ></LI ></UL > The type of driver_status is unsigned short .</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="x291.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="x356.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >host_status</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="sg_io_hdr_t.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >resid</TD ></TR ></TABLE ></DIV ></BODY ></HTML >