From: Jens Axboe <jens.axboe@oracle.com>
To: Rene Herman <rene.herman@gmail.com>
Cc: Al Viro <viro@ftp.linux.org.uk>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: mcdx -- do_request(): non-read command to cd!!
Date: Sat, 31 Mar 2007 08:47:13 +0200 [thread overview]
Message-ID: <20070331064711.GF6246@kernel.dk> (raw)
In-Reply-To: <460D7F70.3090702@gmail.com>
On Fri, Mar 30 2007, Rene Herman wrote:
> Hi Al.
>
> GIT doesn't remember, it's been too long, but IIRC you were the last one
> to do some work on mcdx (the old proprietary mitsumi cd-rom driver). The
> thing builds without warnings on 2.6.20.4, unlike most other proprietary
> CD-ROM drivers, so someone did...
>
> In any case, I just bet you're positively thrilled receiving bug-reports
> for the thing right? Mmm?
>
> I dug up a 1-speed Mitsumi CRMC-LU005S today. Brilliant drive! You push
> on the front, after which it comes loose and you then yank the entire
> drive, mechanism and all, out of its casing over some kind of magnetic
> resistance it seems and then open a _second_ top-loading door, put in
> the CD and follow the procedure backwards again. I've done that at least
> 20 times now and I'm not by any means done yet. Brilliant.
>
> The drive works fine under DOS (*), with both IRQ-less and IRQ-enabled
> controllers. The linux driver does not work though:
>
> root@5va2:~# modprobe mcdx
>
> root@5va2:~# dmesg | tail -4
> mcdx Version 2.14(hs)
> mcdx $Id: mcdx.c,v 1.21 1997/01/26 07:12:59 davem Exp $
> Uniform CD-ROM driver Revision: 3.20
> mcdx: Mitsumi CD-ROM installed at 0x300, irq 15. (Firmware version M 4)
>
> root@5va2:~# mount /dev/mcdx0 /mnt/cdrom
> mount: block device /dev/mcdx0 is write-protected, mounting read-only
> mount: /dev/mcdx0: can't read superblock
>
> root@5va2:~# dmesg | tail -4
> mcdx: Mitsumi CD-ROM installed at 0x300, irq 15. (Firmware version M 4)
> mcdx do_request(): non-read command to cd!!
> end_request: I/O error, dev mcdx0, sector 0
> FAT: unable to read boot sector
> root@5va2:~#
>
> This same 300/15 pair works under DOS in the same machine and IRQ15 is
> firing. The error sounds very block-ish. Would you happen to know?
>
> I'll happily test patches :-)
Try this.
diff --git a/drivers/cdrom/mcdx.c b/drivers/cdrom/mcdx.c
index f574962..7086313 100644
--- a/drivers/cdrom/mcdx.c
+++ b/drivers/cdrom/mcdx.c
@@ -577,6 +577,11 @@ static void do_mcdx_request(request_queue_t * q)
if (!req)
return;
+ if (!blk_fs_request(req)) {
+ end_request(req, 0);
+ goto again;
+ }
+
stuffp = req->rq_disk->private_data;
if (!stuffp->present) {
@@ -596,7 +601,7 @@ static void do_mcdx_request(request_queue_t * q)
xtrace(REQUEST, "do_request() (%lu + %lu)\n",
req->sector, req->nr_sectors);
- if (req->cmd != READ) {
+ if (rq_data_dir(req) != READ) {
xwarn("do_request(): non-read command to cd!!\n");
xtrace(REQUEST, "end_request(0): write\n");
end_request(req, 0);
--
Jens Axboe
next prev parent reply other threads:[~2007-03-31 6:52 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-30 21:21 mcdx -- do_request(): non-read command to cd!! Rene Herman
2007-03-31 6:47 ` Jens Axboe [this message]
2007-03-31 18:23 ` Rene Herman
2007-04-01 10:06 ` Pekka Enberg
2007-04-01 10:16 ` Pekka Enberg
2007-04-02 0:02 ` Rene Herman
2007-04-02 0:07 ` Rene Herman
2007-04-02 6:50 ` Pekka J Enberg
2007-04-02 7:10 ` Jens Axboe
2007-04-02 7:37 ` Pekka J Enberg
2007-04-02 8:55 ` Pekka J Enberg
2007-04-02 9:32 ` Boaz Harrosh
2007-04-02 9:42 ` Pekka J Enberg
2007-04-02 9:42 ` Jens Axboe
2007-04-02 21:02 ` Rene Herman
2007-04-02 15:18 ` Rene Herman
2007-04-02 15:45 ` Rene Herman
[not found] ` <Pine.LNX.4.64.0704021837480.6518@sbz-30.cs.Helsinki.FI>
[not found] ` <46112650.8080208@gmail.com>
[not found] ` <Pine.LNX.4.64.0704021906040.7500@sbz-30.cs.Helsinki.FI>
[not found] ` <461165FD.2010508@gmail.com>
[not found] ` <Pine.LNX.4.64.0704030908420.20080@sbz-30.cs.Helsinki.FI>
[not found] ` <Pine.LNX.4.64.0704030956330.20741@sbz-30.cs.Helsinki.FI>
2007-04-03 14:26 ` Rene Herman
2007-04-03 17:37 ` Pekka J Enberg
[not found] ` <461256C1.4020906@gmail.com>
2007-04-03 14:33 ` Pekka J Enberg
2007-04-03 17:31 ` Pekka J Enberg
2007-04-03 18:14 ` Rene Herman
2007-04-03 18:32 ` Pekka J Enberg
2007-04-04 2:10 ` Rene Herman
2007-04-04 6:30 ` Pekka Enberg
2007-04-04 6:19 ` Jens Axboe
2007-04-02 15:39 ` Rene Herman
2007-04-02 6:42 ` Jens Axboe
2007-04-02 7:07 ` Pekka Enberg
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=20070331064711.GF6246@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rene.herman@gmail.com \
--cc=viro@ftp.linux.org.uk \
/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