Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.4.1 /drivers/scsi/sr.c

Filename:/drivers/scsi/sr.c
Lines Added:6
Lines Deleted:4
Also changed in: (Previous) 2.4.1-pre12  2.4.1-pre11  2.4.1-pre10  2.4.1-pre9  2.4.1-pre8  2.4.1-pre6 
(Following) 2.4.1-ac1  2.4.1-ac2  2.4.1-ac3  2.4.1-ac4  2.4.1-ac5  2.4.1-ac6 

Location
[  2.4.1
  [  drivers
    [  scsi
       o  sr.c

Patch

diff -u --recursive --new-file v2.4.0/linux/drivers/scsi/sr.c linux/drivers/scsi/sr.c
--- v2.4.0/linux/drivers/scsi/sr.c   Fri Dec 29 14:07:22 2000
+++ linux/drivers/scsi/sr.c   Sun Jan 28 13:37:50 2001
@@ -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;


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.