237 lines
3.9 KiB
HTML
237 lines
3.9 KiB
HTML
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>Identifying the version of the SG driver</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="PREVIOUS"
|
|
TITLE="What the sg driver does"
|
|
HREF="what.html"><LINK
|
|
REL="NEXT"
|
|
TITLE="Interface"
|
|
HREF="interface.html"></HEAD
|
|
><BODY
|
|
CLASS="CHAPTER"
|
|
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="what.html"
|
|
ACCESSKEY="P"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="80%"
|
|
ALIGN="center"
|
|
VALIGN="bottom"
|
|
></TD
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="right"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="interface.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="CHAPTER"
|
|
><H1
|
|
><A
|
|
NAME="IDDRIVER">Chapter 3. Identifying the version of the SG driver</H1
|
|
><P
|
|
>Earlier versions of the sg device driver either have no version number
|
|
(e.g. the original driver) or a version number starting with "2". The
|
|
drivers that support this new interface have a major version number of
|
|
"3". The sg version numbers are of the form "x.y.z" and the single number
|
|
given by the SG_GET_VERSION_NUM ioctl() is calculated by
|
|
(x * 10000 + y * 100 + z). The sg driver discussed here will yield a
|
|
number greater than or equal to 30000 from SG_GET_VERSION_NUM. The version
|
|
number can also be seen using <B
|
|
CLASS="COMMAND"
|
|
>cat /proc/scsi/sg/version</B
|
|
>
|
|
in the new driver. This document describes sg version 3.1.24 for the
|
|
lk 2.4 series. Where some facility has been added during the lk 2.4
|
|
series (e.g. mmap-ed IO) and hence is not available in all versions
|
|
of the lk 2.4 series, this is noted.
|
|
<A
|
|
NAME="AEN85"
|
|
HREF="#FTN.AEN85"
|
|
>[1]</A
|
|
></P
|
|
><P
|
|
>Here is a list of sg versions that have appeared to date during the
|
|
lk 2.4 series.
|
|
<P
|
|
></P
|
|
><UL
|
|
><LI
|
|
><P
|
|
>lk 2.4.0 : sg version 3.1.17</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>lk 2.4.7 : sg version 3.1.19 [see <TT
|
|
CLASS="FILENAME"
|
|
>include/scsi/sg.h</TT
|
|
> in
|
|
that or a later version for the changelog]</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>lk 2.4.10 : sg version 3.1.20 [This version had several changes put into
|
|
it by third parties over the next 6 release kernel versions.]</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>lk 2.4.17 : sg version 3.1.22 </P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>lk 2.4.19 : sg version 3.1.24 [lk 2.4.19 hasn't been released at the time
|
|
of writing. It will most likely contains sg version 3.1.24 .]</P
|
|
></LI
|
|
></UL
|
|
></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.AEN85"
|
|
HREF="iddriver.html#AEN85"
|
|
>[1]</A
|
|
></TD
|
|
><TD
|
|
ALIGN="LEFT"
|
|
VALIGN="TOP"
|
|
WIDTH="95%"
|
|
><P
|
|
>There is an sg version 3.0.19 which is an optional driver for the lk 2.2
|
|
series. It has the following limitations:
|
|
<P
|
|
></P
|
|
><UL
|
|
><LI
|
|
><P
|
|
>maximum size of SCSI commands is 12 bytes</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>sense buffer limited to 16 bytes</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>resid (residual data transfer count) is always 0</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>direct and mmap-ed IO not supported (defaults to indirect IO)</P
|
|
></LI
|
|
></UL
|
|
></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="what.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="interface.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
>What the sg driver does</TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
> </TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
>Interface</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |