|
I wanted to ask for a clarification
on doing odd byte PIO transfers in Serial ATAPI. Let’s say the host sends
the device a Packet command that contains a CDB which sends data from host to
device (Out) using the PIO protocol and specifies an odd byte count. My
question is what byte count should the device put in the PIO Setup FIS for the
data transfer? Does this byte count include the Pad byte or not? For example, if the host wants to
send 7 bytes to the device, should the device place 7 or 8 in the PIO Setup FIS?
The byte count limit is set to much higher than 7 or 8. Reference http://www.t13.org/docs2004/d1532v1r4b-ATA-ATAPI-7.pdf,
Section 6.25.5.2 which says: Byte
Count High/Low - If the transfer is to be in PIO mode, the byte count of the
data to be transferred for this DRQ
assertion shall be presented. Valid
byte count values are as follows: 1) the
byte count shall be less than or equal to the byte count limit value from the
host; 2) the
byte count shall not be zero; 3) the
byte count shall be less than or equal to FFFEh; 4) the
byte count shall be even except for the last transfer of a command; 5) if
the byte count is odd, the last valid byte transferred is on DD(7:0) and the
data on DD(15:8)
is a pad byte of undefined value; 6) if
the last transfer of a command has a pad byte, the byte count shall be odd. To me
this indicates that the device should not include any pad bytes in the byte
count in the PIO setup FIS. So in my example, the target should ask for 7,
rather than 8 bytes. Does this seem correct? Thanks, Guy
Kendall |
