Re: mcdx -- do_request(): non-read command to cd!!

Jens Axboe
2007-04-02T07:12:10Z

On Mon, Apr 02 2007, Pekka J Enberg wrote:
> On Mon, 2 Apr 2007, Rene Herman wrote:
> > + if (!blk_fs_request(req)) {
> > + spin_lock_irq(q->queue_lock);
>
> Contrary to what I said, this spin_lock_irq() is wrong...
>
> > + end_request(req, 0);
> > + goto again;
> > + }
> > +
> > + spin_unlock_irq(q->queue_lock);
>
> ...because we drop the lock here.

well you did make it overly complex, you should just have dropped the
lock around

spin_unlock_irq(q->queue_lock);
i = mcdx_transfer(...);
spin_lock_irq(q->queue_lock);

and be done with it. But as I wrote earlier, it'll take lots more to
make this driver close to functional. For one, most of the return
statements in do_mcdx_request() really want to be goto again's.

Updated patch attached :-)

diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index 0bc8b0b..cff761a 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -324,3 +324,10 @@ Why: the i8xx_tco watchdog driver has been replaced by the iTCO_wdt
Who: Wim Van Sebroeck <wim@iguana.be>

---------------------------
+
+What: The legacy CDROM drivers (drivers/cdrom/, except cdrom.c)
+When: In 2.6.23
+Why: They are all terminally broken (most don't even compile)
+Who: Jens Axboe <jens.axboe@oracle.com>
+
+---------------------------

--
Jens Axboe