This message is from the T13 list server.

On Mon, 15 Apr 2002 16:45:00 -0600, Pat LaVarre wrote:
>This message is from the T13 list server.
>Yes exactly.  T13 AtapiPio lets the device ask the o.s. to double-buffer at
>least the last byte by making the sum of x1F5:1F4 odd.  T13 AtapiDma leaves
>that feature out.

No it didn't! The CDB said the application wanted 5 bytes. This has
nothing to do with the execution of the ATAPI PACKET 'Inquiry'
command on the ATA interface. 

Pat: Let me ask a question: If your program attempted to execute this
5 byte Inquiry command and in the parameters to the OS driver stack
it provided the following:

a) your famous Inquiry CDB.
b) the memory address of an 8 byte I/O buffer.
c) the size of the I/O buffer as 8 bytes.

How many bytes would you expect the OS driver stack to store into
your application program's I/O buffer?

Pat: Another question: What if you application's CDB asked for 100
bytes but the I/O buffer was only 8 bytes? What happens? 

>> Harlan said: The device is SUPPOSED to transfer in 6 bytes
>>  the host requests 5.
>No ... or you lost me.

Harlan is right. The *device* transfers 6 bytes. It is all in the
definition of a "pad byte". 

>Are you carefully distinguishing the 6 bytes that should be clocked across the
>bus from the 5 bytes that should be copied into memory?  I'm not sure, since
>you chose to use the term "transfer".

At T13 we don't normally talk about internal OS device driver design
issues, especially how OS drivers access and use I/O buffer space in
system memory.

>May I vote to defer discussing MWDMA and UDMA til we understand each other re
>PIO and SWDMA?

I don't want to do that because SW DMA has been obsolete for years.
And I know of no problems that prevent the same command (ATA or
ATAPI) from being executed giving the same effective results on the
ATA interface using PIO or DMA (MW or UltraDMA).

>I agree with you that PIO and SWDMA always will clock across 3 "word"s to copy
>5 or 6 bytes, and that MWDMA and UDMA do this any time the host and the device
>agree out of band to copy 5 or 6 bytes one way or the other.

I stand by my statement that you have some private definition of how
ATA/ATAPI works that doesn't agree with the rest of the world.

>Again, in Atapi Pio, the device should present x1F5:1F4 ByteCount = 5, not 6,
>to copy 5 bytes In.  Furthermore, the AtapiPio host should copy in just 5
>bytes, after clocking 6 bytes across.  If to do that the AtapiPio host has to
>double-buffer, so be it.

T13 does not define what the host side of the interface should do
with the data "clocked" over the interface during read commands.
ATA/ATAPI only specifies that all transfers are an even number of
bytes and that the last byte could be a pad byte. Pat: You are
talking here about OS device driver (or many even host side hardware)
implementations... I strongly suggest you talk to your friends at
Microsoft if you think their OS drivers are not working properly.



*** Hale Landis *** www.ata-atapi.com ***



Reply via email to