Re: Linux 2.4.20-pre2-ac6

Erik Andersen (andersen@codepoet.org)
Thu, 22 Aug 2002 10:27:05 -0600


On Thu Aug 22, 2002 at 12:06:56PM -0400, Alan Cox wrote:
> > Erm Alan, what happened boss ?
> > Lemme resend that jewel.
>
> I dont think you ever sent me code with that one included

I believe it was supposed to be this patch I wrote up a while
back. Though I can't imagine it needing a config option...

--- orig/drivers/ide/ide-cd.c Sat Aug 10 23:40:44 2002
+++ linux-2.4.19/drivers/ide/ide-cd.c Sat Aug 10 23:40:44 2002
@@ -768,6 +768,11 @@
for other errors. */
*startstop = DRIVER(drive)->error(drive, "cdrom_decode_status", stat);
return 1;
+ } else if (sense_key == MEDIUM_ERROR) {
+ /* No point in re-trying a zillion times on a bad
+ * sector... If we got here the error is not correctable */
+ ide_dump_status (drive, "media error (bad sector)", stat);
+ cdrom_end_request(drive, 0);
} else if ((++rq->errors > ERROR_MAX)) {
/* We've racked up too many retries. Abort. */
cdrom_end_request(drive, 0);

-Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--
-
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/