Re: DVD capacity bug for IDE CD's in linux-2.4.0-test6

From: Adam J. Richter (adam@yggdrasil.com)
Date: Mon Aug 14 2000 - 20:49:27 EST


Jens Axboe <axboe@suse.de> writes:
>On Mon, Aug 14 2000, Adam J. Richter wrote:
>> However, adding the following to the beginning of
>> cdrom_get_toc_entry in ide/ide-cd.c does eliminate the problem:
>>
>> if (!CDROM_STATE_FLAGS(drive)->toc_valid)
>> return -EINVAL;
>
>That's a bit rough, though. How about something like
>
> if (!CDROM_STATE_FLAGS(drive)->toc_valid) {
> int ret = cdrom_read_toc(drive, NULL);
> if (ret)
> return ret;
> }
>
>so the toc entry is read and the toc itself refreshed. Does that work
>as well (note untested, just typed it above)?

        But cdrom_read_toc is the routine that called this in
the first place. That would create an infinite loop. Here, again,
is the call graph from my original email:

        Routine File
        cdrom_read_toc ide/ide-cd.c
        cdrom_get_last_written cdrom/cdrom.c
        ide_cdrom_audio_ioctl ide/ide-cd.c
        cdrom_get_toc_entry ide/ide-cd.c

Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 104
adam@yggdrasil.com \ / San Jose, California 95129-1034
+1 408 261-6630 | g g d r a s i l United States of America
fax +1 408 261-6631 "Free Software For The Rest Of Us."

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Aug 15 2000 - 21:00:35 EST