[SCSI] Mask capabilities for SCSI-1 CD drive
authorChuck Ebbert <76306.1226@compuserve.com>
Thu, 12 Jan 2006 04:58:40 +0000 (23:58 -0500)
committerJames Bottomley <jejb@mulgrave.(none)>
Thu, 12 Jan 2006 17:56:01 +0000 (11:56 -0600)
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@compuserve.com>
Acked-by: Jens Axboe <axboe@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/sr.c

index ec73223ad2ea0ff0ed88bd001c286106612eaf7e..18a3b756c63cb79409028622d8e763d73e13e142 100644 (file)
@@ -763,8 +763,9 @@ static void get_capabilities(struct scsi_cd *cd)
                /* 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;