From: Itay Ben-Yaacov <pezz@math.mit.edu>
To: Jens Axboe <axboe@suse.de>, linux-kernel@vger.kernel.org
Subject: ide-cd detects wrong DVD size
Date: Thu, 11 Mar 2004 00:06:00 -0500 [thread overview]
Message-ID: <20040311050558.GA7497@pisica> (raw)
Hi,
There appears to be a bug in ide-cd.c, which makes it unusable for
playing DVDs -- at some point it just stops reading. This bug does
not exist when using ide-scsi (I heard reports that short DVDs are OK).
The reason seems to be in a wrong detected size:
"blockdev --getsize" gives different results
with ide-cd and with ide-scsi+sr_mod, the latter being the correct
one.
I believe I tracked the problem to "cdrom_read_toc()":
The following (lines 2304-2310) sets the correct capacity (line
numbers are from 2.6.3):
/* Try to get the total cdrom capacity and sector size. */
stat = cdrom_read_capacity(drive, &toc->capacity,
§ors_per_frame,
sense);
if (stat)
toc->capacity = 0x1fffff;
set_capacity(drive->disk, toc->capacity * sectors_per_frame);
But a bit later, on lines 2420-2425, it gets set again, this time to a
wrong value:
/* Now try to get the total cdrom capacity. */
stat = cdrom_get_last_written(cdi, &last_written);
if (!stat && last_written) {
toc->capacity = last_written;
set_capacity(drive->disk, toc->capacity *
sectors_per_frame);
}
Why is this second capacity setting there, and what is it
supposed to do exactly?
Thanks,
Itay
next reply other threads:[~2004-03-11 5:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-11 5:06 Itay Ben-Yaacov [this message]
2004-03-11 6:51 ` ide-cd detects wrong DVD size Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040311050558.GA7497@pisica \
--to=pezz@math.mit.edu \
--cc=axboe@suse.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.