Re: libATA SATA errors on DVD bad sectors...

From: Maciej Åenczykowski
Date: Tue Sep 22 2009 - 13:42:41 EST


> Later you write that ata12 connects to a Promise SATA300 TX4.
> In that case, port_status 0x20280000 means:
> - Overrun Error
> - Drive Error
> - Packet Command Cycle
> which means that the drive set its error status flag and raised an interrupt which prematurely terminated a data transfer.

Yes, the code in question is here:
http://lxr.linux.no/linux+v2.6.31/drivers/ata/sata_promise.c#L748

> The obvious next experiment would be to swap the drives and see how the Lite-On behaves on the ICH9 and the LG behaves on the TX4.

Yup, did that earlier this morning. The controller is the cause, not
the drives. (ie. getting the same error on ata12 even though it's now
the LG, the LiteOn on AHCI is now kernel error message free, still
giving IO errors of course)

> Â> Would it make sense to add this somewhere into the code as a 'bad sector' error condition and not perform a hard reset?
>
> The sata_promise driver upon seeing the port_status above sets AC_ERR_HSM and AC_ERR_DEV, and performs a soft reset. Apparently libata-eh follows up with a hard(er) reset, which doesn't surprise me given the HSM and DEV errors.

> So things actually work Ok with the Lite-On on the TX4, and you're mainly concerned about log messages and potential performance loss?

Yes, putting the LiteOn on the AHCI controller seems to speed stuff up
a fair bit (some 20-25% or so).
OTOH, I'd prefer to keep the blu-ray drive on AHCI, since the TX4
controller is just a measly PCI controller.

- Maciej
--
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/