Devices not supporting read-6....

Jens Axboe axboe en suse.de
Dom Ene 23 00:28:27 CST 2000


On Sat, Jan 22 2000, Alan Cox wrote:
> > So the only device where you have to use READ(6) are probably pre-scsi2
> > harddisks (which havn't enouth space for a current unpacked kernel source
> > tree...)
> 
> And which are still found. My old MacII root disk for example 8).
> 
> I dont think its a big issue tho

Excellent, then could we please include this patch in 2.2.15? We
discussed it for 2.2.14, but decided to wait since it was rather
late in the cycle.

Alternatively, we can just rip out the READ_6/WRITE_6 parts. But
with the ability to fall back to the 6 byte variants even your
old MacII disk should be ok ;)

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