All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Pat LaVarre <p.lavarre@ieee.org>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH] fix cdrom mt rainier probe
Date: Wed, 14 Jul 2004 07:41:33 +0200	[thread overview]
Message-ID: <20040714054133.GI3055@suse.de> (raw)
In-Reply-To: <1089752141.3786.3.camel@patibmrh9>

On Tue, Jul 13 2004, Pat LaVarre wrote:
> > > Mt rainier probe must be deferred to media load time, ...
> > ...
> > something broke in deciding disc rewritable or not? ...
> > Only for /dev/hdd PATAPI, not for /dev/scd0 USB?
> 
> Can any of us easily sketch a legit fix for this?  By now we know,
> 
> a)
> 
> The key evil is not getting back 0 0 in reply to the query:
> 
> $ sudo blockdev --getro /dev/hdd /dev/scd0
> 1
> 0
> $
> 
> b)
> 
> A completely bogus hack of a workaround is:
> 
> sudo blockdev --setrw /dev/hdd
> 
> c)
> 
> Below is that same completely bogus hack, expressed as a kernel patch
> Not suitable for kernel.org.
> 
> Pat LaVarre
> http://linux-pel.blog-city.com/read/728344.htm
> 
> --- linux-2.6.8-rc1/drivers/ide/ide-cd.c	2004-07-13 08:26:05.000000000 -0600
> +++ linux-2.6.8-rc1-pel/drivers/ide/ide-cd.c	2004-07-13 14:33:40.000000000 -0600
> @@ -3251,6 +3251,7 @@ int ide_cdrom_setup (ide_drive_t *drive)
>  	 * set correct block size and read-only for non-ram media
>  	 */
>  	set_disk_ro(drive->disk, !CDROM_CONFIG_FLAGS(drive)->ram);
> +	set_disk_ro(drive->disk, 0);

Trace that backwards and find out why ->ram isn't getting set.

-- 
Jens Axboe


  reply	other threads:[~2004-07-14  5:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-13 17:57 [PATCH] fix cdrom mt rainier probe Pat LaVarre
2004-07-13 20:55 ` Pat LaVarre
2004-07-14  5:41   ` Jens Axboe [this message]
2004-07-14 23:34     ` Pat LaVarre
2004-07-16  0:39       ` Pat LaVarre
2004-07-16 12:25         ` Jens Axboe
2004-07-16 12:28           ` Jens Axboe
2004-07-16 15:58             ` Pat LaVarre
2004-07-16 16:02               ` Jens Axboe
2004-07-16 16:19                 ` Pat LaVarre
2004-07-16 17:51                   ` Jens Axboe
2004-07-18  0:43                     ` Pat LaVarre

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=20040714054133.GI3055@suse.de \
    --to=axboe@suse.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=p.lavarre@ieee.org \
    /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.