Messages in this thread Patch in this message | | | Date | Tue, 3 Apr 2007 20:31:51 +0300 (EEST) | From | Pekka J Enberg <> | 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |