Device flags: use_10_for_rw and use_10_for_ms

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

 



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

-
: 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