lkml.org 
[lkml]   [2007]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: mcdx -- do_request(): non-read command to cd!!
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

-
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-02 09:15    [W:1.566 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site