Re: Packet writing problems

From: Peter Osterlund
Date: Mon Aug 16 2004 - 13:57:36 EST


Frediano Ziglio <freddyz77@xxxxxx> writes:

> I'm trying to do packet writing with my new DVD writer.
>
> # cat /proc/ide/hdc/model
> PIONEER DVD-RW DVR-107D
>
> dma enabled.
> After some tests with 2.4 I decided to switch to 2.6.
> I used Fedora Core 2 with a vanilla kernel 2.6.8.1 + patch from
> http://w1.894.telia.com/~u89404340/patches/packet/2.6/, udftools with
> Petero patch (http://w1.894.telia.com/~u89404340/patches/packet/, same
> site and author).
>
> However I get a lot of problems mount/unmounting devices...
>
> DVD+RW
> mkudffs /dev/hdc does not works... doing a strace opening /dev/hdc for
> read/write open returns EROFS (or similar). I tried with blockdev
> --setrw but still same errors...

I see two problems. The first problem is that the Mt Rainier detection
can succeed when it shouldn't, because it forgets to check that the
"GET CONFIGURATION" command returns the MRW feature number. On one of
my drives, the command returns feature 0x2a which is DVD+RW.

This bug has nothing to do with the packet writing driver, and the
patch below fixes it.

Signed-off-by: Peter Osterlund <petero2@xxxxxxxxx>

---

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-08-16 20:35:45.332325832 +0200
+++ linux-petero/drivers/cdrom/cdrom.c 2004-08-16 20:38:32.513910368 +0200
@@ -521,6 +521,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@xxxxxxxxx
http://w1.894.telia.com/~u89404340
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/