This message is from the T13 list server.
The other day Larry (I think it was Larry?) referenced that USB
data transfer table. Pat has used that USB based table to
support some of his arguments for saying ATA/ATAPI DMA is wrong.
However, that USB table doesn't match the requirements of the
ATA/ATAPI interface. ATA/ATAPI is far less forgiving of hosts or
devices that function incorrectly. Below is my table for
ATA/ATAPI. This table is used for both PIO and DMA. It follows
the same format as the USB table (yea, I didn't use exactly
the same notation).
===begin
Hale's Data Transfer table
for ATA/ATAPI PIO and DMA
The following table is the ATA/ATAPI equivalent to the table at
Pat's web site. The table shows the host and device data
transfer expectations for all possible command executions. Pat's
table is apparently from some USB document.
Remember that the ATA/ATAPI host is everything on the host side
of the ATA cable. That includes all the host hardware and
software. T13 does not care what the host is, or how the host is
designed or how the host operates as long as it conforms to the
host side requirements at host interface cable connector.
Each block in the table is numbered and those numbers match the
numbers in your table. Below the table is additional information
for each block inside the table.
This table is used for all PIO and DMA data transfer commands.
Key:
H = number of bytes host wants to transfer.
D = number of bytes device wants to transfer.
H and D include any required pad byte.
The value of D is determined by the device using only the command
and the command parameters. The value of H is determined by the
host based on the command and the command parameters.
+--------+--------------------------------------------+
|Device | Host expects |
|expects | Hnone | Hread | Hwrite |
| | H=0 | H>0 | H>0 |
+--------+--------------+--------------+--------------+
| |1 H=D=0 |4 H>0, D=0 |9 H>0, D=0 |
| Dnone | | Device | Device |
| D=0 | No | error or | error or |
| | problem | Broken | Broken |
| | | host | host |
+--------+--------------+--------------+--------------+
| |2 Command |5 H>D |10 Command |
| | mismatch: | Device | mismatch: |
| | broken | error or | broken |
| | host | Not enough | host |
| | | data | |
| Dread | +--------------+ |
| D>=0 | |6 H=D | |
| | | | |
| | | No | |
| | | problem | |
| | | | |
| | +--------------+ |
| | |7 H<D | |
| | | | |
| | | Broken | |
| | | host | |
| | | | |
+--------+--------------+--------------+--------------+
| |3 Command |8 Command |11 H>D |
| | mismatch: | mismatch: | Device |
| | broken | broken | error or |
| | host | host | Broken |
| | | | host |
| Dwrite | | +--------------+
| D>=0 | | |12 H=D |
| | | | |
| | | | No |
| | | | problem |
| | | | |
| | | +--------------+
| | | |13 H<D |
| | | | |
| | | | Broken |
| | | | host |
| | | | |
+--------+--------------+--------------+--------------+
Why do we say broken host and not broken device? Because there
is no specifications/standards for how a host operates
internally. However, we have lots of standards for how devices
shall be implemented. Yes, it is possible for a device to be
implemented incorrectly and in that case the device would be a
broken device. Note that a device detected error condition does
not indicate a broken device.
Block 1: A command that transfers no data.
Block 2: The host implementation for the command does not match
the device implementation, the host is broken.
Block 3: The host implementation for the command does not match
the device implementation, the host is broken.
Block 4: A command that the device fails due to a device
detected error condition -or- the host implementation for the
command does not match the device implementation.
Block 5: A read command that ends early due to an error
condition detected by the device -or- a read command for which
the device does not have all the data the host expects, could
be a broken host.
Block 6: A read command.
Block 7: The host is expecting less data than the device wants
to transfer, the host is broken.
Block 8: The host implementation for the command does not match
the device implementation, the host is broken.
Block 9: A write command that ends early due to an error
condition detected by the device -or- the host implementation
for the command does not match the device implementation.
Block 10: The host implementation for the command does not match
the device implementation, the host is broken.
Block 11: The write command ends early due to an error condition
detected by the device -or- the host has more data than the
command requires, the host is broken.
Block 12: A write command.
Block 13: The host does not have all the data the command
requires, the host is broken.
===end
*** Hale Landis *** www.ata-atapi.com ***