old-www/HOWTO/SCSI-Generic-HOWTO/x291.html

249 lines
4.4 KiB
HTML

<HTML
><HEAD
><TITLE
>host_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="sb_len_wr"
HREF="x288.html"><LINK
REL="NEXT"
TITLE="driver_status"
HREF="x322.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="x288.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="x322.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN291">6.18. host_status</H1
><P
> These codes potentially come from the firmware on a host adapter
or from one of several hosts that an adapter driver controls.
The 'host_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 <A
HREF="sg3_utils.html"
>Appendix A</A
>):
<P
></P
><UL
><LI
><P
> SG_ERR_DID_OK [0x00] NO error</P
></LI
><LI
><P
> SG_ERR_DID_NO_CONNECT [0x01] Couldn't connect before timeout period</P
></LI
><LI
><P
> SG_ERR_DID_BUS_BUSY [0x02] BUS stayed busy through time out period</P
></LI
><LI
><P
> SG_ERR_DID_TIME_OUT [0x03] TIMED OUT for other reason (often this
an unexpected device selection timeout)</P
></LI
><LI
><P
> SG_ERR_DID_BAD_TARGET [0x04] BAD target, device not responding?</P
></LI
><LI
><P
> SG_ERR_DID_ABORT [0x05] Told to abort for some other reason. From
lk 2.4.15 the SCSI subsystem supports 16 byte commands however few
adapter drivers do. Those HBA drivers that don't support 16 byte
commands will yield this error code if a 16 byte command is passed to
a SCSI device they control.</P
></LI
><LI
><P
> SG_ERR_DID_PARITY [0x06] Parity error. Older SCSI parallel buses
have a parity bit for error detection. This probably indicates
a cable or termination problem.</P
></LI
><LI
><P
> SG_ERR_DID_ERROR [0x07] Internal error detected in the host adapter.
This may not be fatal (and the command may have succeeded). The
aic7xxx and sym53c8xx adapter drivers sometimes report this for
data underruns or overruns.
<A
NAME="AEN312"
HREF="#FTN.AEN312"
>[1]</A
></P
></LI
><LI
><P
> SG_ERR_DID_RESET [0x08] The SCSI bus (or this device) has been reset.
Any SCSI device on a SCSI bus is capable of instigating a reset.</P
></LI
><LI
><P
> SG_ERR_DID_BAD_INTR [0x09] Got an interrupt we weren't expecting</P
></LI
><LI
><P
> SG_ERR_DID_PASSTHROUGH [0x0a] Force command past mid-layer</P
></LI
><LI
><P
> SG_ERR_DID_SOFT_ERROR [0x0b] The low level driver wants a retry</P
></LI
></UL
>
The type of host_status is unsigned short .</P
></DIV
><H3
CLASS="FOOTNOTES"
>Notes</H3
><TABLE
BORDER="0"
CLASS="FOOTNOTES"
WIDTH="100%"
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="5%"
><A
NAME="FTN.AEN312"
HREF="x291.html#AEN312"
>[1]</A
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="95%"
><P
>In some cases the sym53cxx driver reports a DID_ERROR when it internally
rounds up an odd transfer length by 1. This is an example of a "non-error".</P
></TD
></TR
></TABLE
><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="x288.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="x322.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>sb_len_wr</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"
>driver_status</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>