linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Device flags: use_10_for_rw and use_10_for_ms
@ 2005-11-28 21:43 Alan Stern
  2005-11-29 20:03 ` Jens Axboe
  0 siblings, 1 reply; 8+ messages in thread
From: Alan Stern @ 2005-11-28 21:43 UTC (permalink / raw)
  To: Patrick Mansfield, James Bottomley; +Cc: SCSI development list

Patrick and James:

There are a couple of problems with the implementation of the 
use_10_for_rw and use_10_for_ms flags.

The easy problem is that use_10_for_rw is implemented twice: once in 
sd.c:sd_rw_intr and once in scsi_lib.c:scsi_io_completion.  The obvious 
fix is to remove of them.  Since scsi_io_completion is more general, it 
makes sense to leave the code there and remove it from sd.c.

The hard problem is that sometimes devices return an ILLEGAL_REQUEST sense
key when they shouldn't.  I posted an example a week or two ago; what
happened was the use_10_for_rw flag got turned off and from then on only
6-byte commands were used (and of course the device failed to recognize
them).

Clearly we need a mechanism for going the other way: when a 6-byte command 
gets ILLEGAL_REQUEST sense, turn the use_10_for_xxx flag back on.  The 
difficulty is that this will cause an infinite retry loop if the device 
doesn't like either form of the command.

Is there a standard way to limit the number of retries for these cases in 
scsi_io_completion?  The code pathway involves getting rid of the 
scsi_cmnd and keeping only the struct request, so I don't know where an 
appropriate place would be to store the retry counter.

Any ideas?

Alan Stern


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

end of thread, other threads:[~2005-11-30 15:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-28 21:43 Device flags: use_10_for_rw and use_10_for_ms Alan Stern
2005-11-29 20:03 ` Jens Axboe
2005-11-29 21:23   ` Alan Stern
2005-11-29 22:48     ` Patrick Mansfield
2005-11-30 15:46       ` Alan Stern
2005-11-30  8:08     ` Jens Axboe
2005-11-30 14:46       ` James Bottomley
2005-11-30 14:51         ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).