[EMAIL PROTECTED] 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 [EMAIL PROTECTED]

Reply via email to