public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* How to make sd retry a command?
@ 2006-09-22 21:19 Alan Stern
  2006-09-22 21:34 ` Brian King
  0 siblings, 1 reply; 2+ messages in thread
From: Alan Stern @ 2006-09-22 21:19 UTC (permalink / raw)
  To: SCSI development list

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-09-22 21:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-22 21:19 How to make sd retry a command? Alan Stern
2006-09-22 21:34 ` Brian King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox