linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* libata EH appears to be NFG up to 2.6.17 (at least).
@ 2006-07-06 20:37 Mark Lord
  2006-07-06 20:47 ` Jeff Garzik
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Lord @ 2006-07-06 20:37 UTC (permalink / raw)
  To: Jeff Garzik, IDE/ATA development list

Got your attention now?  Good!

I am doing some testing with known-bad drives on 2.6.16 (and 2.6.17).

Libata EH is wretched there, because it does not seem to be careful
about reading/saving the bad ata_status value when an error occurs.

The ata_status from a failed/aborted command is first read in
the interrupt handler, either by the LLD or by ata_host_intr().

This value is not saved for reuse anywhere, and the next time it is read,
the reader will see ATA_ERR==0, and then not do the Right Thing (tm).

Who reads it next, you ask?  Well, it gets read *again* from libata-scsi
when it is trying to generate meaningful sense data.  But at that point,
all that is seen is 0x50 -- "success".

So libata-scsi returns incorrect (or no) sense data to the SCSI mid-layer,
and the error is mishandled or ignored.

Ugh.  The distro folks will probably want to fix this in their 2.6.1[56]
based distro kernels.  I don't yet see a way to do this without modifying
core data structures (eg. adding an ata_status field to the qc).

Any ideas?

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-07-08 16:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-06 20:37 libata EH appears to be NFG up to 2.6.17 (at least) Mark Lord
2006-07-06 20:47 ` Jeff Garzik
2006-07-06 20:51   ` Mark Lord
2006-07-06 21:24     ` Mark Lord
2006-07-06 22:09       ` Jeff Garzik
2006-07-06 23:22         ` Ric Wheeler
2006-07-07 13:03         ` Mark Lord
2006-07-08 16:56           ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).