All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Stefan Meyknecht <sm0407@nurfuerspam.de>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cdrom: MO-drive open write fix (trivial)
Date: Mon, 9 Aug 2004 08:33:24 +0200	[thread overview]
Message-ID: <20040809063323.GB10418@suse.de> (raw)
In-Reply-To: <200408071412.17411.sm0407@nurfuerspam.de>

On Sat, Aug 07 2004, Stefan Meyknecht wrote:
> Jens Axboe <axboe@suse.de> wrote:
> > drive. If you could look into why that isn't set for your mo device
> > and send a patch for that, it would be much better.
> 
> Assuming mo devices can do random writing, how about this patch:
> 
> --- linux/drivers/cdrom/cdrom.c.orig	2004-08-07 14:02:28.958908544 +0200
> +++ linux/drivers/cdrom/cdrom.c	2004-08-07 13:58:29.306167698 +0200
> @@ -833,8 +833,11 @@ static int cdrom_open_write(struct cdrom
>  	if (!cdrom_is_mrw(cdi, &mrw_write))
>  		mrw = 1;
>  
> -	(void) cdrom_is_random_writable(cdi, &ram_write);
> -
> +	if (CDROM_CAN(CDC_MO_DRIVE))
> +		ram_write = 1;
> +	else
> +		(void) cdrom_is_random_writable(cdi, &ram_write);
> +	
>  	if (mrw)
>  		cdi->mask &= ~CDC_MRW;
>  	else
> @@ -855,7 +858,7 @@ static int cdrom_open_write(struct cdrom
>  	else if (CDROM_CAN(CDC_DVD_RAM))
>  		ret = cdrom_dvdram_open_write(cdi);
>   	else if (CDROM_CAN(CDC_RAM) &&
> - 		 !CDROM_CAN(CDC_CD_R|CDC_CD_RW|CDC_DVD|CDC_DVD_R|CDC_MRW))
> + 		 !CDROM_CAN(CDC_CD_R|CDC_CD_RW|CDC_DVD|CDC_DVD_R|CDC_MRW|CDC_MO_DRIVE))
>   		ret = cdrom_ram_open_write(cdi);
>  	else if (CDROM_CAN(CDC_MO_DRIVE))
>  		ret = mo_open_write(cdi);

Patch looks fine (last hunk is a little code, but that's not your
fault). Thanks!

-- 
Jens Axboe


  parent reply	other threads:[~2004-08-09  6:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-06 16:33 [PATCH] cdrom: MO-drive open write fix (trivial) Stefan Meyknecht
2004-08-07  5:06 ` Andrew Morton
2004-08-07  8:38   ` Jens Axboe
2004-08-07 10:35     ` Stefan Meyknecht
2004-08-07 12:12     ` Stefan Meyknecht
2004-08-07 21:57       ` Alan Cox
2004-08-09  6:33       ` Jens Axboe [this message]
2004-08-13 17:17         ` Stefan Meyknecht
2004-08-13 17:26           ` Jens Axboe
2004-08-13 17:47             ` Stefan Meyknecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040809063323.GB10418@suse.de \
    --to=axboe@suse.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sm0407@nurfuerspam.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.