Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751082AbWALHjN (ORCPT ); Thu, 12 Jan 2006 02:39:13 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750891AbWALHjN (ORCPT ); Thu, 12 Jan 2006 02:39:13 -0500 Received: from ns.virtualhost.dk ([195.184.98.160]:52516 "EHLO virtualhost.dk") by vger.kernel.org with ESMTP id S1750824AbWALHjM (ORCPT ); Thu, 12 Jan 2006 02:39:12 -0500 Date: Thu, 12 Jan 2006 08:41:02 +0100 From: Jens Axboe To: Chuck Ebbert <76306.1226@compuserve.com> Cc: linux-scsi , linux-kernel Subject: Re: [patch] Mask capabilities for SCSI-1 CD drive Message-ID: <20060112074102.GC17718@suse.de> References: <200601112359_MC3-1-B5B7-409F@compuserve.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200601112359_MC3-1-B5B7-409F@compuserve.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1069 Lines: 33 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 -- Jens Axboe - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/