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

195 lines
3.6 KiB
HTML

<HTML
><HEAD
><TITLE
>SG_SCSI_RESET</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="Ioctl()s"
HREF="ioctl.html"><LINK
REL="PREVIOUS"
TITLE="SG_SET_RESERVED_SIZE (and _GET_ )"
HREF="gs_rs_size.html"><LINK
REL="NEXT"
TITLE="SG_GET_SCSI_ID"
HREF="g_scsi_id.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="gs_rs_size.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 8. Ioctl()s</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="g_scsi_id.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="SCSI_RESET">8.15. SG_SCSI_RESET</H1
><DIV
CLASS="FORMALPARA"
><P
><B
>SG_SCSI_RESET 0x2284. </B
>Assumes 3rd argument points to an int. That int should be one of the
following defined in the <TT
CLASS="FILENAME"
>sg.h</TT
> header:
<P
></P
><UL
><LI
><P
>SG_SCSI_RESET_NOTHING (0x0): can be used to poll the device
after a reset has been issued to see if it has returned to the normal
state. If it is still being reset or it is offline then EBUSY will be
placed in errno,</P
></LI
><LI
><P
>SG_SCSI_RESET_DEVICE (0x1): issues a reset to the SCSI
device associated with the current sg file descriptor,</P
></LI
><LI
><P
>SG_SCSI_RESET_BUS (0x2): issues a reset to the SCSI
bus that contains the device associated with the current sg file descriptor.
This will usually have an adverse effect on any other SCSI device sharing
this SCSI bus, especially if it was in the middle of an operation,</P
></LI
><LI
><P
>SG_SCSI_RESET_HOST (0x3): issues a reset to the host that
controls the SCSI bus that contains the device associated with the
current sg file descriptor. This operation can have an adverse effect
on any SCSI device that is connected to this host.</P
></LI
></UL
>
The reset options are in ascending order of severity. Not all levels
are supported by all linux lower level drivers. Most lower level
(adapter) drivers support the SCSI bus reset. These boards often issue
a SCSI bus reset during their initialization.</P
></DIV
><P
>Unfortunately this ioctl() doesn't currently do much (but may in the
future after other issues are resolved). Yields an EBUSY error if the
SCSI bus or the associated device is being reset when this ioctl() is
called, otherwise returns 0.
N.B. In some recent distributions there is a patch to the SCSI mid level
code that activates this ioctl. Check your distribution.</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="gs_rs_size.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="g_scsi_id.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>SG_SET_RESERVED_SIZE (and _GET_ )</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ioctl.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>SG_GET_SCSI_ID</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>