From: Jens Axboe <axboe@suse.de>
To: Peter Osterlund <petero2@telia.com>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Fix incorrect Mt Rainier detection
Date: Tue, 26 Oct 2004 08:33:25 +0200 [thread overview]
Message-ID: <20041026063324.GA8306@suse.de> (raw)
In-Reply-To: <m3wtxeijjk.fsf@telia.com>
On Mon, Oct 25 2004, Peter Osterlund wrote:
> cdrom_is_mrw() can incorrectly think that a drive is Mt Rainier
> capable, because if forgets to check if the "GET CONFIGURATION"
> command returns the MRW feature number. According to the MMC spec,
> the drive shall return all feature numbers >= the starting feature
> number, so even if the drive doesn't support Mt Rainier, it can return
> some data that makes cdrom_is_mrw() incorrectly think the drive is MRW
> capable.
>
> This problem stops me from mounting DVD+RW discs in R/W mode on my
> laptop, because it makes cdrom_open_write() call
> cdrom_mrw_open_write() which fails because the drive isn't really MRW
> capable.
>
> The fix is to make sure the returned feature number is the correct one
> for Mt Rainier.
>
> Signed-off-by: Peter Osterlund <petero2@telia.com>
Acked-by: Jens Axboe <axboe@suse.de>
> ---
>
> linux-petero/drivers/cdrom/cdrom.c | 2 ++
> 1 files changed, 2 insertions(+)
>
> diff -puN drivers/cdrom/cdrom.c~mrw-fix drivers/cdrom/cdrom.c
> --- linux/drivers/cdrom/cdrom.c~mrw-fix 2004-10-25 22:43:15.711347640 +0200
> +++ linux-petero/drivers/cdrom/cdrom.c 2004-10-25 22:43:15.716346880 +0200
> @@ -546,6 +546,8 @@ int cdrom_is_mrw(struct cdrom_device_inf
> return ret;
>
> mfd = (struct mrw_feature_desc *)&buffer[sizeof(struct feature_header)];
> + if (be16_to_cpu(mfd->feature_code) != CDF_MRW)
> + return 1;
> *write = mfd->write;
>
> if ((ret = cdrom_mrw_probe_pc(cdi))) {
> _
>
> --
> Peter Osterlund - petero2@telia.com
> http://w1.894.telia.com/~u89404340
>
--
Jens Axboe
prev parent reply other threads:[~2004-10-26 6:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-25 21:18 Peter Osterlund
2004-10-26 6:33 ` Jens Axboe [this message]
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=20041026063324.GA8306@suse.de \
--to=axboe@suse.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=petero2@telia.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome