[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0704032030470.8078@sbz-30.cs.Helsinki.FI>
Date: Tue, 3 Apr 2007 20:31:51 +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 Tue, 3 Apr 2007, Pekka J Enberg wrote:
> 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...
Oh, well, here goes. Rene, would you be so kind and spin the wheel once
more? =)
Pekka
diff --git a/drivers/cdrom/mcdx.c b/drivers/cdrom/mcdx.c
index f574962..8ed61c9 100644
--- a/drivers/cdrom/mcdx.c
+++ b/drivers/cdrom/mcdx.c
@@ -672,6 +672,7 @@ static int mcdx_open(struct cdrom_device
if (-1 == mcdx_requesttocdata(stuffp, &stuffp->di, 1)) {
stuffp->lastsector = -1;
+ set_capacity(stuffp->disk, 0);
} else {
@@ -692,6 +693,7 @@ static int mcdx_open(struct cdrom_device
stuffp->di.msf_leadout.second,
stuffp->di.msf_leadout.frame,
msf2log(&stuffp->di.msf_leadout));
+ set_capacity(stuffp->disk, stuffp->lastsector + 1);
}
if (stuffp->toc) {
-
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