[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0704031723580.3355@sbz-30.cs.Helsinki.FI>
Date: Tue, 3 Apr 2007 17:33:14 +0300 (EEST)
From: Pekka J Enberg <penberg@...helsinki.fi>
To: Rene Herman <rene.herman@...il.com>
cc: linux-kernel@...r.kernel.org, Jens Axboe <jens.axboe@...cle.com>
Subject: Re: 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@...2:~# dmesg -c >/dev/null
> root@...2:~# 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@...2:~# 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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists