2001-02-02 05:13:21

by Fredrik Vraalsen

[permalink] [raw]
Subject: [Patch] DVD bugfix in ide-cd.c


This is a small patch to Linux kernel 2.4.1 that fixes a problem with
DVD playback in OMS (Open Media System). With the stock 2.4.1 kernel
OMS will only play up to a certain point on the DVD before it complains
about no more data left on input (basically read() returns 0). This
patch reverts a change between 2.4.0 and 2.4.1.


diff -u --recursive --new-file v2.4.0/linux/drivers/ide/ide-cd.c linux/drivers/ide/ide-cd.c
--- v2.4.0/linux/drivers/ide/ide-cd.c Tue Jan 2 16:59:17 2001
+++ linux/drivers/ide/ide-cd.c Sun Jan 28 13:37:50 2001
@@ -1872,6 +1872,9 @@
If it is, just return. */
(void) cdrom_check_status(drive, sense);

+ if (CDROM_STATE_FLAGS(drive)->toc_valid)
+ return 0;
+
/* First read just the header, so we know how long the TOC is. */
stat = cdrom_read_tocentry(drive, 0, 1, 0, (char *) &toc->hdr,
sizeof(struct atapi_toc_header), sense);


--
Fredrik Vraalsen - Research Assistant, Pablo research group
Department of Computer Science, University of Illinois at U-C


2001-02-02 06:44:23

by Peter Rasmussen

[permalink] [raw]
Subject: Re: [Patch] DVD bugfix in ide-cd.c

This patch made it work for me watching DVDs that used to stop, ie. oms
crashed. So I'll approve the patch :-)

Peter

Fredrik Vraalsen <[email protected]> on 01 Feb 2001 23:12:44 wrote:
>
>
>This is a small patch to Linux kernel 2.4.1 that fixes a problem with
>DVD playback in OMS (Open Media System). With the stock 2.4.1 kernel
>OMS will only play up to a certain point on the DVD before it complains
>about no more data left on input (basically read() returns 0). This
>patch reverts a change between 2.4.0 and 2.4.1.
>
>
>diff -u --recursive --new-file v2.4.0/linux/drivers/ide/ide-cd.c linux/drivers/ide/ide-cd.c
>--- v2.4.0/linux/drivers/ide/ide-cd.c Tue Jan 2 16:59:17 2001
>+++ linux/drivers/ide/ide-cd.c Sun Jan 28 13:37:50 2001
>@@ -1872,6 +1872,9 @@
> If it is, just return. */
> (void) cdrom_check_status(drive, sense);
>
>+ if (CDROM_STATE_FLAGS(drive)->toc_valid)
>+ return 0;
>+
> /* First read just the header, so we know how long the TOC is. */
> stat = cdrom_read_tocentry(drive, 0, 1, 0, (char *) &toc->hdr,
> sizeof(struct atapi_toc_header), sense);
>
>
>--
>Fredrik Vraalsen - Research Assistant, Pablo research group
>Department of Computer Science, University of Illinois at U-C
>

2001-02-02 14:08:44

by Jens Axboe

[permalink] [raw]
Subject: Re: [Patch] DVD bugfix in ide-cd.c

On Thu, Feb 01 2001, Fredrik Vraalsen wrote:
>
> This is a small patch to Linux kernel 2.4.1 that fixes a problem with
> DVD playback in OMS (Open Media System). With the stock 2.4.1 kernel
> OMS will only play up to a certain point on the DVD before it complains
> about no more data left on input (basically read() returns 0). This
> patch reverts a change between 2.4.0 and 2.4.1.

Thanks applied, guess we need another work-around for buggy changers...

--
Jens Axboe

2001-02-02 14:26:26

by Andre Hedrick

[permalink] [raw]
Subject: Re: [Patch] DVD bugfix in ide-cd.c

On Fri, 2 Feb 2001, Jens Axboe wrote:
> Thanks applied, guess we need another work-around for buggy changers...
>
> --
> Jens Axboe

To quote my friend, about comments agreeing with Hale Landis.....
WHY!!! are you still supporting junk? ;-)

Cheers,

Andre Hedrick
Linux ATA Development
ASL Kernel Development
-----------------------------------------------------------------------------
ASL, Inc. Toll free: 1-877-ASL-3535
1757 Houret Court Fax: 1-408-941-2071
Milpitas, CA 95035 Web: http://www.aslab.com