patch-2.4.21 linux-2.4.21/drivers/scsi/sr.c

Next file: linux-2.4.21/drivers/scsi/sun3_NCR5380.c
Previous file: linux-2.4.21/drivers/scsi/sim710.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.20/drivers/scsi/sr.c linux-2.4.21/drivers/scsi/sr.c
@@ -211,11 +211,13 @@
 
 
 	if (driver_byte(result) != 0 &&		/* An error occurred */
-	    SCpnt->sense_buffer[0] == 0xF0) {	/* Sense data is valid */
+	    (SCpnt->sense_buffer[0] & 0x7f) == 0x70) {	/* Sense data is valid */
 		switch (SCpnt->sense_buffer[2]) {
 		case MEDIUM_ERROR:
 		case VOLUME_OVERFLOW:
 		case ILLEGAL_REQUEST:
+			if (!(SCpnt->sense_buffer[0] & 0x80))
+				break;
 			error_sector = (SCpnt->sense_buffer[3] << 24) |
 			(SCpnt->sense_buffer[4] << 16) |
 			(SCpnt->sense_buffer[5] << 8) |

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)