aic7xxx and error recovery

Giuliano Pochini
2002-10-31T22:29:45Z

I have a magneto-optical drive. Recoverable error rate is quite high
in this kind of devices (1 bit every 10^5, according to specs, but
it's actually much lower IMHO). I was playing with the SCSI error
recovery page and I noticed that when I enable the PER flag (which
makes the drive to tell the initiator when a recoverable medium
error occurs) strange things happen. I wrote a small prg that writes
random patterns and then reads it back and compare it with the
pattern. It happens that when a recoverable error occurs (as
reported in the sys logs) read()(2) returns a value smaller then
requested, and the loaded data is identical to the pattern, or
read() completes, but the data is wrong. This two cases seem to
be mutually exclusive, I've tried a lot of times. I don't know why
this happens, but IMO if read(length)==length then the data I get
shouldn't be corrupted. I believe there is a bug in the scsi
driver, because if PER==0 I never get corrupted data, and PER==1
doesn't affects data sent to the initiator, it only reports
recovered errors. Comments ?

[Linux Jay 2.4.19 #3 mer ago 14 15:29:00 CEST 2002 ppc unknown]

Bye.