Re: ATA device reset, shoud I be concerned?

From: Jeff Garzik
Date: Wed Aug 26 2009 - 23:07:25 EST


On 08/26/2009 10:40 PM, Robert Hancock wrote:
On 01/21/2008 08:33 AM, Tejun Heo wrote:
Tejun Heo wrote:
IMHO, losing media error information is much better than locking up a
machine hard. We can start white listing known good controllers but I'm
skeptical how much benefit it will bring.

Just a data point, even ICHs lock up after PHY event if the wrong TF
register is accessed. I just don't think tempting with TF regs after
timeout is worth the cost.

Nvidia CK804 SATA controllers appear to also explode on reading TF
registers after media errors in certain cases. (They tend to either
lockup the machine or throw HyperTransport timeout machine check
exceptions). I suspect those error paths aren't well tested (except that
it even explodes in Windows with the default Microsoft IDE driver, when
reading a scratched DVD on a SATA drive, for example.)

Well, reading TF when DMA or other operation is enabled is a big no-no... according to spec. If we are touching TF before data xfer operation is completed, and host controller has a chance to receive D2H FIS, TF is undefined (except Status, in some cases).

Jeff




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