* [patch] Mask capabilities for SCSI-1 CD drive
@ 2006-01-12 4:58 Chuck Ebbert
2006-01-12 7:41 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Chuck Ebbert @ 2006-01-12 4:58 UTC (permalink / raw)
To: Jens Axboe; +Cc: linux-scsi, linux-kernel
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>
--- 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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch] Mask capabilities for SCSI-1 CD drive
2006-01-12 4:58 [patch] Mask capabilities for SCSI-1 CD drive Chuck Ebbert
@ 2006-01-12 7:41 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2006-01-12 7:41 UTC (permalink / raw)
To: Chuck Ebbert; +Cc: linux-scsi, linux-kernel
On Wed, Jan 11 2006, Chuck Ebbert wrote:
> 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>
>
> --- 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;
Looks fine, thanks.
Acked-by: Jens Axboe <axboe@suse.de>
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-01-12 7:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-12 4:58 [patch] Mask capabilities for SCSI-1 CD drive Chuck Ebbert
2006-01-12 7:41 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).