Devices not supporting read-6....
Jens Axboe
axboe en suse.de
Sab Ene 22 11:00:03 CST 2000
On Fri, Jan 21 2000, Rogier Wolff wrote:
> Hi,
>
> As far as I know, "read-6" is a very mandatory command. However
> there is a device, the
>
> {"TOSHIBA","DVD-RAM SD-W1101","*", BLIST_GHOST},
>
> which doesn't implement it.
The W1111 doesn't either. And if you look at write-6 we have the
same problem.
>
> What do we do?
>
> - Blacklist it as "doesn't support read-6" and implement
> stuff to prevent read-6 if that flag is set?
>
> - Ignore the issue, and just let people with this hardware
> live with a non-working drive?
>
> Is there maybe already something implemented? Anybody the "owner" of
> that piece of code?
I updated sd in 2.3 to use READ_10/WRITE_10 whenever possible and
fall back to the 6 byte variants if the device does not support it.
The actual patch is very simple, we just change the ten flag
to read "use only 10 byte read/writes". I've attached it. I
generally don't like the black lists, I'd much rather do it
dynamically.
> I seem to own the "blist_ghost" stuff, so it's going to be listed
> there, but then the system runs into not-working read-6 commands.
Yes, it gets quite ugly. I battled with the W1111 for some time
before I discovered its READ_6/WRITE_6 weirdness.
> P.S. (I'm not on linux-scsi, and I'm on vacation starting saturday).
> I had been hoping it would've been as easy as listing the drive as
> a 'blist_ghost' thing, but now things are more complicated...
Still easy ;)
--
* Jens Axboe <axboe en suse.de>
* Linux CD-ROM Maintainer
* http://www.kernel.dk
------------ próxima parte ------------
--- linux-2.2.14-pre10/drivers/scsi/sd.c Thu Dec 2 20:43:31 1999
+++ linux/drivers/scsi/sd.c Fri Dec 3 13:21:37 1999
@@ -483,11 +483,16 @@
* would be a ten byte read where only a six byte read was supported.
* Also, on a system where READ CAPACITY failed, we have have read
* past the end of the disk.
+ *
+ * Don't screw with the ten byte flag unless we are certain that
+ * the drive does not understand the command /axboe
*/
if (SCpnt->sense_buffer[2] == ILLEGAL_REQUEST) {
if (rscsi_disks[DEVICE_NR(SCpnt->request.rq_dev)].ten) {
- rscsi_disks[DEVICE_NR(SCpnt->request.rq_dev)].ten = 0;
+ if (SCpnt->cmnd[0] == READ_10 || SCpnt->cmnd[0] == WRITE_10 ||
+ SCpnt->sense_buffer[12] == 0x20)
+ rscsi_disks[DEVICE_NR(SCpnt->request.rq_dev)].ten = 0;
requeue_sd_request(SCpnt);
result = 0;
} else {
@@ -1016,7 +1021,7 @@
this_count = this_count << 1;
}
- if (((this_count > 0xff) || (block > 0x1fffff)) && rscsi_disks[dev].ten)
+ if (((this_count > 0xff) || (block > 0x1fffff)) || rscsi_disks[dev].ten)
{
if (this_count > 0xffff)
this_count = 0xffff;
Más información sobre la lista de distribución Ayuda