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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Pekka J Enberg
Date: Tuesday, April 3, 2007 - 10:31 am

On Tue, 3 Apr 2007, Pekka J Enberg wrote:

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) {
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: mcdx -- do_request(): non-read command to cd!!, Pekka J Enberg, (Tue Apr 3, 7:33 am)
Re: mcdx -- do_request(): non-read command to cd!!, Pekka J Enberg, (Tue Apr 3, 10:31 am)
Re: mcdx -- do_request(): non-read command to cd!!, Rene Herman, (Tue Apr 3, 11:14 am)
Re: mcdx -- do_request(): non-read command to cd!!, Pekka J Enberg, (Tue Apr 3, 11:32 am)
Re: mcdx -- do_request(): non-read command to cd!!, Rene Herman, (Tue Apr 3, 7:10 pm)
Re: mcdx -- do_request(): non-read command to cd!!, Jens Axboe, (Tue Apr 3, 11:19 pm)
Re: mcdx -- do_request(): non-read command to cd!!, Pekka Enberg, (Tue Apr 3, 11:30 pm)