lkml.org 
[lkml]   [2007]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: mcdx -- do_request(): non-read command to cd!!
On 04/03/2007 08:57 AM, Pekka J Enberg wrote:
> > Does this change the dd case?
> >
> > diff --git a/drivers/cdrom/mcdx.c b/drivers/cdrom/mcdx.c
> > index f574962..6c613d0 100644
> > --- a/drivers/cdrom/mcdx.c
> > +++ b/drivers/cdrom/mcdx.c
> > @@ -1248,6 +1248,7 @@ #endif
> > disk->private_data = stuffp;
> > disk->queue = mcdx_queue;
> > add_disk(disk);
> > + blk_queue_hardsect_size(mcdx_queue, MCDX_CDBLK);
> > printk(msg);
> > return 0;
> > }

On Tue, 3 Apr 2007, Rene Herman wrote:
> No, I'm afraid not. It's still the same effect:
>
> root@5va2:~# dmesg -c >/dev/null
> root@5va2:~# strace -o dd.strace dd if=/dev/mcdx0 of=/dev/null
> 0+0 records in
> 0+0 records out
> 0 bytes (0 B) copied, 0.00438956 seconds, 0.0 kB/s
> root@5va2:~# dmesg >dd.xtrace

Looking at the dd strace:

> close(0) = 0
> open("/dev/mcdx0", O_RDONLY|O_LARGEFILE) = 0
> _llseek(0, 0, [0], SEEK_CUR) = 0

The block device is open, dd has the current offset.

> close(1) = 0
> open("/dev/null", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 1

[snip]

> read(0, "", 512) = 0

We start to read but get nothing!

> close(0) = 0
> close(1) = 0

Now looking at the driver debug trace:

> mcdx open() Single Session disk found
> mcdx mcdx_media_changed called for device mcdx0
> mcdx:: talk() 1 / 5000 tries, res.size 1, command 0x40<7>mcdx::

We do mcdx_getstatus() here...

> mcdx:: talk() command sent
> mcdx:: *** delay: sleepq
> mcdx:: delay awoken
> mcdx:: *** delay: sleepq
> mcdx:: delay awoken
> mcdx:: talk() got status 0x50
> mcdx:: talk() done with 0x50

...and the status bits seem to be MCDX_RBIT_CHECK and MCDX_RBIT_CHECK.

> mcdx:: close()

However, we never hit do_mcdx_request(). Jens, do we need to do
set_capacity() somewhere? I don't see other cdrom drivers doing it but
they could be broken too...

Pekka
-
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/

\
 
 \ /
  Last update: 2007-04-03 16:35    [W:1.814 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site