How to make sd retry a command?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've seen a few examples of USB storage devices that return clearly bogus 
error information on occasion.  For instance, the device might return 
CHECK CONDITION status with SK=5 (Illegal request) and ASC=20 (Invalid 
command) for a WRITE_10, even though it has accepted many other READ_10 
and WRITE_10 commands previously.  I don't know why the device does this.

When this happens, rather than failing the transfer entirely it makes 
sense to retry it.  Right now sd will switch over from WRITE_10 to 
WRITE_6, which is definitely the wrong thing to do.  I can prevent that 
easily enough.  The question is how to force a retry.

What information should sd_rw_intr() pass to scsi_io_completion() to
request a retry?  Or is there some other way of doing it?

And how can the number of retries be limited, say to 3?

Alan Stern

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux