Re: ide-cd.c, "MEDIUM_ERROR" handling

From: Gunther Mayer
Date: Tue Apr 18 2006 - 11:41:06 EST


Zinx Verituse wrote:

I recently bought a DVD drive which appears to not retry enough when it's
having trouble reading a disc - I'm requesting an option (or changing the
default behavior) so that this drive is actually usable with the Linux
ide-cd drivers - specificly, the code:
} 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);
do_end_request = 1;
}
needs to be disabled for my drive to read CDs properly.

With this code enabled, no retries are made, and the kernel sees medium errors
and returns bad data to the application reading;

It would be a kernel bug if it returns bad data. It should return an error code to the application.

- The device should implement a decent retry strategy.
- There are special forensic applications which can be tuned to re-read bad sectors multiple times if needed.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/