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

Next file: linux/drivers/sound/Config.in
Previous file: linux/drivers/scsi/sg.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0/linux/drivers/scsi/sr.c linux/drivers/scsi/sr.c
@@ -671,12 +671,14 @@
 	cmd[3] = cmd[5] = 0;
 	rc = sr_do_ioctl(i, cmd, buffer, 128, 1, SCSI_DATA_READ, NULL);
 
-	if (-EINVAL == rc) {
-		/* failed, drive has'nt this mode page */
+	if (rc) {
+		/* failed, drive doesn't have capabilities mode page */
 		scsi_CDs[i].cdi.speed = 1;
-		/* disable speed select, drive probably can't do this either */
-		scsi_CDs[i].cdi.mask |= CDC_SELECT_SPEED;
+		scsi_CDs[i].cdi.mask |= (CDC_CD_R | CDC_CD_RW | CDC_DVD_R |
+					 CDC_DVD | CDC_DVD_RAM |
+					 CDC_SELECT_DISC | CDC_SELECT_SPEED);
 		scsi_free(buffer, 512);
+		printk("sr%i: scsi-1 drive\n", i);
 		return;
 	}
 	n = buffer[3] + 4;

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