| home | help | back | first | fref | pref | prev | next | nref | lref | last | post |
Message-ID: <381120A2.2FC5B6B@interlog.com> Date: Fri, 22 Oct 1999 22:42:42 -0400 From: Douglas Gilbert <dgilbert@interlog.com> MIME-Version: 1.0 To: kenneth topp <caught@prodigy.net> CC: linux-scsi@vger.rutgers.edu Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit kenneth topp wrote: > > This may be a sore subject, but does this new sg interface settle all the > issues raised by this document?: > http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/sg.text > > I hope so, In any case the subject should be discussed. I'll take Joerg Schilling's points one by one (indenting his with ">>>"). "It" refers to the "sg" SCSI device driver, most likely as it is found in the 2.0 series of kernels. vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv >>> It has the following problems: >>> It cannot see if a SCSI command could not be sent at all. I'm not sure what is being referred to here. No one has ever demonstrated this to me. >>> It cannot get the SCSI status byte. [snip] This refers to the original driver in the 2.0 series and up to 2.2.5 . Joerg's interface, the one from 2.2.6 onwards and the new interface yield the SCSI status value. >>> It cannot get real DMA count of transfer. [snip] Changes accepted into the 2.3 series of kernels make allowance for a DMA residual count. The only adapter driver that currently supports this is Advansys version 3.2I . Hopefully more will follow. Here is an example: # sg_dd if=/dev/sgb of=/dev/null count=1k bs=515 1024+0 records in 1024+0 records out >> Non-zero sum of residual counts=3072 In this case /dev/sgb is a disk with 512 byte sectors. >>> It cannot get number of bytes valid in auto sense data. [snip] The new interface allows the user to specify the maximum number of sense buffer bytes and yields the actual number output. >>> It fetches to[o] few data in auto request sense >>> (CCS/SCSI-2/SCSI-3 needs >= 18). [snip] Changes accepted into the 2.3 series of kernels increase the sense buffer held by the SCSI mid level structures from 16 to 64 bytes. Evidentally SCSI 3 in some situations outputs to byte 56. >>> It cannot send SCSI commands with vendor unique lengths. This can be specified directly in the new interface and awkwardly (via an ioctl) in kernels 2.2.10 and above. The SCSI mid level still limits the maximum SCSI command length to 12 bytes. Ken Preslan <kpreslan@zarniwoop.com> posted a patch to extend this to 16 bytes. If the impact isn't too great on existing adapter drivers then it might be possible to squeeze it into to 2.3 before before the "freeze" solidifies. ------------------------------------------------------------ And today Joerg Schilling posted a positive note about the new interface on the cdwrite@other.debian.org reflector: "The priciple idea seeems to be OK, however the actual structure contains unneccesary members. I cleaned it up a bit:" .... I hope this doesn't mean another round of alternate interfaces sitting atop a common implementation :-) Doug Gilbert - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.rutgers.edu
| home | help | back | first | fref | pref | prev | next | nref | lref | last | post |