From: Jens Axboe <axboe@suse.de>
To: Pat LaVarre <p.lavarre@ieee.org>
Cc: linux-scsi@vger.kernel.org, John McKell <McKellj@iomega.com>
Subject: Re: CDC_RAM for lk 2.4, PATCH proposed
Date: Wed, 19 May 2004 10:15:35 +0200 [thread overview]
Message-ID: <20040519081534.GE30348@suse.de> (raw)
In-Reply-To: <1084897080.3746.38.camel@patibmrh9>
On Tue, May 18 2004, Pat LaVarre wrote:
> In the absence of a consensus over a more elegant resolution, I'm
> getting by for now with the following, dramatically concise,
> alternative.
>
> Pat LaVarre
>
> ----- Forwarded Message -----
> ...
>
> grep in the rewritable-patch-0.3b/rewrite-2.4.26.patch of
> http://sourceforge.net/projects/iomrrdtools/ reminds me the source files
> at issue are:
>
> include/linux/cdrom.h
> drivers/ide/ide-cd.h
> drivers/ide/ide-cd.c
> drivers/scsi/sr.c
> drivers/cdrom/cdrom.c
>
> The following two file patch gives me the result:
>
> $ sudo rrd scan
> /dev/scd0 is Iomega RRD 74.B rw
> /dev/hdc is Iomega RRD 74.B rw
> $
> $ sudo dd of=/dev/scd0 bs=64K count=1 if=/dev/zero
> 1+0 records in
> 1+0 records out
> $
> $ sudo dd of=/dev/hdc bs=64K count=1 if=/dev/zero
> 1+0 records in
> 1+0 records out
> $
>
> rather than the kernel.org 2.4.18 default:
>
> $ sudo rrd scan
> /dev/scd0 is Iomega RRD 74.B rw
> /dev/hdc is Iomega RRD 74.B rw
> $
> $ sudo dd of=/dev/scd0 bs=64K skip=0 count=1 if=/dev/zero
> dd: opening `/dev/scd0': Read-only file system
> $
> $ sudo dd of=/dev/hdc bs=64K skip=0 count=1 if=/dev/zero
> dd: opening `/dev/hdc': Read-only file system
> $
>
> Pat LaVarre
>
> diff -Nurp linux-2.4.18/include/linux/cdrom.h linux-2.4.18-pel/include/linux/cdrom.h
> diff -Nurp linux-2.4.18/drivers/ide/ide-cd.h linux-2.4.18-pel/drivers/ide/ide-cd.h
> diff -Nurp linux-2.4.18/drivers/ide/ide-cd.c linux-2.4.18-pel/drivers/ide/ide-cd.c
> --- linux-2.4.18/drivers/ide/ide-cd.c 2002-02-25 12:37:57.000000000 -0700
> +++ linux-2.4.18-pel/drivers/ide/ide-cd.c 2004-05-18 08:55:14.000000000 -0600
> @@ -2599,6 +2599,13 @@ int ide_cdrom_get_capabilities(ide_drive
> if (!stat)
> break;
> } while (--attempts);
> +#if 1 /* see all DVD/CD drives as DVD-RAM/ DVD-ROM compatible */
> + if (!stat) {
> + cap->dvd_rom = 1;
> + cap->dvd_ram_read = 1;
> + cap->dvd_ram_write = 1;
> + }
> +#endif
> return stat;
> }
This looks incredibly odd - if we succeed in getting the mode sense
capabilities page, you force setting og dvd-rom/ram?!
> diff -Nurp linux-2.4.18/drivers/scsi/sr.c linux-2.4.18-pel/drivers/scsi/sr.c
> --- linux-2.4.18/drivers/scsi/sr.c 2002-02-25 12:38:04.000000000 -0700
> +++ linux-2.4.18-pel/drivers/scsi/sr.c 2004-05-18 08:55:53.000000000 -0600
> @@ -709,6 +709,10 @@ void get_capabilities(int i)
> return;
> }
> n = buffer[3] + 4;
> +#if 1 /* see all DVD/CD drives as DVD-RAM/ DVD-ROM compatible */
> + buffer[n + 2] |= 0x28; /* readable: x20 = DVD-RAM, x08 = DVD-ROM */
> + buffer[n + 3] |= 0x20; /* writable: x20 = DVD-RAM */
> +#endif
> scsi_CDs[i].cdi.speed = ((buffer[n + 8] << 8) + buffer[n + 9]) / 176;
> scsi_CDs[i].readcd_known = 1;
> scsi_CDs[i].readcd_cdda = buffer[n + 5] & 0x01;
> diff -Nurp linux-2.4.18/drivers/cdrom/cdrom.c linux-2.4.18-pel/drivers/cdrom/cdrom.c
Ditto here. Please explain your reasoning for this patch. And do base
patches on recent kernels please, 2.4.18 is over 2 years old.
--
Jens Axboe
next prev parent reply other threads:[~2004-05-19 8:15 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-15 16:52 CDC_RAM for lk 2.4, PATCH proposed Pat LaVarre
2004-04-16 12:09 ` Jens Axboe
2004-04-23 22:25 ` John McKell
2004-04-28 1:46 ` Pat LaVarre
2004-04-28 14:48 ` Pat LaVarre
[not found] ` <1084897080.3746.38.camel@patibmrh9>
2004-05-19 8:15 ` Jens Axboe [this message]
2004-05-19 15:45 ` Pat LaVarre
2004-05-20 8:06 ` Jens Axboe
2004-05-20 22:01 ` Pat LaVarre
2004-05-20 23:51 ` Pat LaVarre
2004-05-21 6:53 ` Jens Axboe
2004-05-21 15:28 ` Pat LaVarre
2004-06-03 18:30 ` Pat LaVarre
2004-06-03 18:32 ` Jens Axboe
2004-06-04 14:53 ` Marcelo Tosatti
2004-06-04 15:18 ` Pat LaVarre
2004-06-04 15:24 ` Jens Axboe
2004-06-04 15:27 ` Pat LaVarre
2004-06-04 15:36 ` Jens Axboe
2004-06-18 21:42 ` 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=20040519081534.GE30348@suse.de \
--to=axboe@suse.de \
--cc=McKellj@iomega.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox