| home | help | back | first | fref | pref | prev | next | nref | lref | last | post |
Message-ID: <37F2C16F.D02C4154@interlog.com> Date: Wed, 29 Sep 1999 21:48:31 -0400 From: Douglas Gilbert <dgilbert@interlog.com> MIME-Version: 1.0 To: nealjunk@driversoft.com CC: linux-scsi@vger.rutgers.edu Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit nealjunk@driversoft.com wrote: > > Hi, > How can I get the error info after a failed ioctl? I send a CDB > > to the device and it is failing... but when I do a CDB to return the error > codes it is blank. It looks like the SCSI passthrough driver has already > got the information. > > How do I get it? Neal, Are you talking about the SCSI_IOCTL_SEND_COMMAND ioctl()? If so, from the code (scsi_ioctl.c around line 319), it looks like the sense buffer is written back overwriting the command that you sent into the ioctl(). The scsi sub-system does "auto-sense" which means that it automatically executes REQUEST SENSE after a failure was detected on the original command. Doing an explicit REQUEST SENSE subsequent to the auto-sense will not be useful. 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 |