[patch] Mask capabilities for SCSI-1 CD drive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



SCSI-1 CD drives can't do MRW or be opened for writing, so mask off
those capabilities.

Signed-off-by: Chuck Ebbert <76306.1226@xxxxxxxxxxxxxx>

--- 2.6.15a.orig/drivers/scsi/sr.c
+++ 2.6.15a/drivers/scsi/sr.c
@@ -762,8 +762,9 @@ static void get_capabilities(struct scsi
 		/* failed, drive doesn't have capabilities mode page */
 		cd->cdi.speed = 1;
 		cd->cdi.mask |= (CDC_CD_R | CDC_CD_RW | CDC_DVD_R |
-					 CDC_DVD | CDC_DVD_RAM |
-					 CDC_SELECT_DISC | CDC_SELECT_SPEED);
+				 CDC_DVD | CDC_DVD_RAM |
+				 CDC_SELECT_DISC | CDC_SELECT_SPEED |
+				 CDC_MRW | CDC_MRW_W | CDC_RAM);
 		kfree(buffer);
 		printk("%s: scsi-1 drive\n", cd->cdi.name);
 		return;
-- 
Chuck
Currently reading: _Olympos_ by Dan Simmons
-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux