This message is from the T13 list server.
I my further attempt to "call to order" the discussion I suggest
those that are interested:
1) look at my data transfer matrix (sent this morning in a previous
email).
2) look at the information below.
The first thing to understand is that there is no difference between
using PIO or DMA for an ATAPI data transfer command. Unless the
device is broken it will transfer the same number of bytes in both
PIO or DMA and that may include a pad byte as the last byte. Here is
a message I sent to Pat some days ago:
===begin
Compare PIO and DMA transfers for the sa
command:
======================================================================
PIO | DMA
|
wordsTransferred = 0 | wordsTransferred = 0
numberBlocks = 0 | numberBlocks = 0
while ( command_in_progress ) | while ( command_in_progress )
{ | {
when ( DRQ_data_block_ready ) | when ( DMA_data_burst_ready )
{ | {
get BC |
N = (BC+1)/2 |
transfer_N_words | transfer_N_words
wordsTransferred += n | wordsTransferred += N
numberBlocks += 1 | numberBlocks += 1
} | }
} | }
|
======================================================================
It doesn't matter if PIO or DMA is used - the transfer is always
an even number of bytes.
It doesn't matter if PIO or DMA is used - if the command ends
with no error then
PIO.wordsTransferred == DMA.wordsTransferred
but
PIO.numberBlocks has no relationship to DMA.numberBlocks
It doesn't matter if PIO or DMA is used - the last byte (of the
last word) might be a pad byte.
It doesn't matter if MultiWord DMA or UltraDMA is used - the same
N words are transferred.
If the actual transfer was an odd number of bytes the last byte
of the last word is a pad byte. The host must understand this
based on the command that was sent to the device. Nothing in the
typical host side controller or in the ATA/ATAPI protocols know
anything about odd transfers or pad bytes. PIO and DMA are the
same in this respect - the ATA/ATAPI hardware and protocols
transfer only 16-bit "words" of data.
===end
Hale
*** Hale Landis *** www.ata-atapi.com ***