This message is from the T13 list server.
Andy W:
As a side effect of implementing T10/04-262 on linux, I have made it trivial to issue ATA commands with mismatched transfer length vs. sector count (i.e. a 4 sector read with a 2 sector buffer.) The current linux/libata behaviour in this situation is to hang the port thusly:
ata1: command 0x20 timeout, stat 0x58 host_stat 0x0 ATA: abnormal status 0x58 on port 0xF8A3CC87 ata1: status=0x58 { DriveReady SeekComplete DataRequest }
Note: mismatches where the issued sector count < transfer length, fail in a non-fatal manner.
Yep.
These low Hamming distance accidents appear charted as the "6.7" "The Thirteen Cases" in "Table 6.1" "Host/Device Data Transfer Matrix" of the 1999 usbmassbulk_10.pdf.
As you here, so there likewise, for max simplicity & thruput we required the "thin diagonal" of sector count = transfer length, tolerated but complained of the "positive residue" of sector count < transfer length, and freaked out (saying Other rather than Pass or Fail) over the "negative residue" of when transfer length < sector count. When Other occurs, the Host has no recovery available apart from Reset. Another popular way to reach Other is to get the transfer direction wrong.
You're deep enough into this now that you might enjoy my somewhat arcane essay:
http://members.aol.com/plscsi/cdbcomplete.html
particularly the diagram of lock step host/ device state machines at "4." "The Five Common Results".
The blogged discussion at http://plavarre.blog-city.com/read/547918.htm includes the 2004-04-21 feedback:
... very well written ...
... would benefit us all if this were required reading for all interface code developers ...
Pat LaVarre
P.S. Please note that an ATA SRST resets both ID 0 and ID 1 when applied to PATA. Within PATA, only the op x08 Device Reset targets a specific device.
