The flow control rules in ATA/ATAPI-7 volume 3 section 15.4.8.1 (revision 4) leave open two holes I haven't seen discussed:
"The maximum allowed latency from the time the MSB of the HOLD primitive is on the wire, until the MSB of the HOLDA is on the wire shall be no more than 20 DWORD times. The LSB is transmitted first. A receiver shall be able to accommodate reception of 20 DWORDs of additional data after the time it transmits the HOLD flow control character to the transmitter, and the transmitter shall respond with a HOLDA in response to receiving a HOLD character within 20 DWORD times."
1. ALIGNs sent by the frame transmitter are not supposed to count against this budget, although they do consume a "DWORD time." Sending 10 data dwords, 2 ALIGNs, and 10 data dwords would technically violate the above statement but not really be an error.
2. HOLDs sent by the frame transmitter cannot always count against this budget. Assume the frame transmitter is in LT4:L_SendData and it finds it has no more data to send, so it moves to LT6:L_SendHOLD and starts transmitting HOLDs. It remains in that state as long as it has no more data to send. If a HOLD shows up, it does not leave the state and switch to transmitting HOLDAs; it continues sending HOLDs. Only when it decides it has no more data to send does it switch states; it goes to LT5:L_RcvrHold until the incoming HOLDs go away.
Unlike ALIGNs, the HOLDs cannot just be excluded from the budget. The frame transmitter won't ever leave the HOLD state to send a few more data dwords before sending the HOLDA in reply to a HOLD it received while it was transmitting HOLD itself; it always goes directly to sending HOLDA.
Previously mentioned on the T13 list:
3. The 20/20 transmit/receive rule, based on a mythical wire delay of 0, doesn't make sense. It should either be 19/20 or 20/21 (I prefer 19/20; Knut preferred 20/21). If a transmitter takes n dwords to reply to HOLD with HOLDA, the receiver is going to see the reply n + 1 dwords after it sent the HOLD, not n dwords later.
Incorporating #1, #2, and #3 (assuming 20/21 is chosen), I suggest this text:
"Not including ALIGNs, the frame transmitter shall transmit no more than:
a) 20 data dwords; or
b) 20 or fewer data dwords following by one or more HOLD primitives,
after receiving a HOLD primitive before transmitting HOLDA primitives.
Not including ALIGNs, the frame receiver shall accept at least:
a) 21 data dwords; or
b) 21 or fewer data dwords following by one or more HOLD primitives,
after transmitting a HOLD primitive before expecting HOLDA primitives."
4. In section 15.7.1.3 Link receive state diagram (page 142-145), "LR5:L_SendHold" should be called "LR5:L_RcvrHold" since the state sends HOLDA or DMAT, not HOLD. LR4:L_Hold sends HOLD, and is more deserved of the L_SendHold name; changing its name might also make sense.
In comparison, in the transmitter state machine, the states are called LT6:L_SendHold (sends HOLD) and LT5:L_RcvrHold (sends HOLDA).
--
Rob Elliott, [EMAIL PROTECTED]
Hewlett-Packard Industry Standard Server Storage Advanced Technology
https://ecardfile.com/id/RobElliott
