Re: Problems with Toshiba SD-W2002 DVD-RAM drive (IDE)

Stefan Jaschke (s-jaschke@t-online.de)
Thu, 19 Apr 2001 23:11:31 +0200


On Thursday 19 April 2001 15:03, Jens Axboe wrote:
> On Thu, Apr 19 2001, Stefan Jaschke wrote:
> > OK. I'll check again with 2.4.4-pre4+patches:
> > (1) Mounting the SuSE DVD-ROM (-t iso9660) from /dev/hdc on /dvd and
> > reading from /dvd works. Same for CD-ROMs. I don't have a formatted
> > DVD-RAM.
> > (2) Reading with "dd if=/dev/hdc ..."
> > (2.1) works with CD-ROM inserted
> > (2.2) fails with DVD-ROM inserted
>
> dd fails with DVD-ROM inserted??? In the same way? Is this the SuSE DVD,
> and not a movie DVD? Also, check dmesg for errors.
> > (2.3) fails with DVD-RAM inserted

"dd if=/dev/hdc of=/dev/null bs=2k count=3" produces the same strace, whether
the DVD-RAM or the SuSE DVD-ROM is inserted. I interpret the fact that the
first read() returns 0 as some lower layer coming to the conclusion that
"/dev/hdc" has length 0.
The only line that appears in the system logs is
"VFS: Disk change detected on device ide1(22,0)"
when I change the disks.

> > (3) Writing with "dd of=/dev/hdc ..." works (with DVD-RAM inserted).
> > (4) "mke2fs -b 2048 /dev/hdc" fails (with DVD-RAM inserted).
I took a closer look at the strace of the "mke2fs ...". The first system call
that fails is
old_mmap(NULL, 504938496, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = -1 ENOMEM
It asks for 481MB, which I simply don't have. (128MB RAM, 256MB swap).
So, this may be unrelated to the kernel, just a quirk of mke2fs to ask for
that much memory.

> Could be, try
> cat /proc/ide/hdc/capacity
0 (with empty tray)
8946816 (with single-sided 4.7GB DVD-RAM)
4875840 (with single-sided 2.6GB DVD-RAM)
9106700 (with SuSE DVD-ROM)
1325240 (with SuSE CD-ROM)

Seem to be 512 Byte blocks. Looks OK.

> And lets stick to hardware for now, ok? :-)
This means "There is hope to get the drive working under Linux"?

Correct me if I am wrong in my interpretations.

There are two mysteries (for me at least) left:
(1) Why does mke2fs need 481MB memory?
(2) Why does the very first read() on /dev/hdc return EOF?

What would you suggest to try next?

Stefan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/