This document outlines the Linux SCSI Generic (sg) driver
interface as found in the 2.4 series kernels. The driver's purpose is to
allow SCSI commands to be sent directly to SCSI devices. The responses of
those commands can then be obtained. This type of driver is sometimes termed
as a "pass through".
In the case of SCSI disks, the block subsystem which is normally used to
mount and access a disk, is bypassed permitting low level operations such as
formatting to be performed. Various specialized applications for writing
CD-Rs and document scanning use the sg driver.
Many devices that use other physical buses (e.g. ATAPI cdroms, USB
mass storage devices and IEEE 1394 sbp2 devices) utilize the SCSI command
set. By using Linux pseudo SCSI device drivers which bridge between
the native protocol stack and the SCSI subsystem, the upper level
SCSI device drivers, including sg, can be used to control "non-SCSI"
devices.
This is the third major version of the sg driver.
A summary of the sg driver history is as follows:
This document can be found at the Linux Documentation Project's site at
www.linuxdoc.org/HOWTO/SCSI-Generic-HOWTO/ .
It is available in plain text and pdf renderings at that site.
A (possibly later) version of this document can be found at
www.torque.net/sg/p/sg_v3_ho.html.
That is a single html page; drop the ".html" extension for multi-page
html. There are also postscript, pdf and rtf renderings from the original
SGML (docbook) file at the same location.
A more general description of the Linux SCSI subsystem of which sg is a
part can be found in the
SCSI-2.4-HOWTO.
This document was last modified on 3rd May 2002.