This message is from the T13 list server.
>On Thu, 24 Jan 2002 17:59:06 -0700, Pat LaVarre wrote: >This message is from the T13 list server. >But some of us think in the lab we see the byte counts for UDma >Out gets off by more and more as the UDma burst rate increases. Pat, I really don't want to get started on this again but just so Mark doesn't get confused... For any given SCSI CDB passed to an ATAPI device both the host and the device know the exact or maximum number of bytes that will be transferred assuming there is no error. For "write" commands the number is exact... the host must be programmed in PIO mode or DMA mode to transfer exactly that number of bytes to the device. There is nothing vague about this, no random side effects, no lost data bytes, no extra data bytes (except maybe a pad byte as the last byte of the data transfer). For "read" commands, the story is a little more complex only because there are some "read" commands that can transfer a variable amount of data. These are commands like Request Sense and Inquiry maybe even Mode Sense. Just use PIO for these commands. But here even in PIO mode the host needs to be prepared to accept the maximum number of bytes the command can transfer. And again this maximun number is based on the CDB data, for example, it could be the Allocation Length value in the Request Sense CDB. Except for a few tape devices that really have variable block sizes, ALL commands that transfer data from the device's media have an exact block size that is know to both host and device BEFORE the command is executed... for any given command that transfers data from a device's media the host will receive exactly that number of bytes (except maybe a pad byte as the last byte of the data transfer)... In both PIO mode and DMA mode the host must be prepared to receive this amount of data otherwise you have a "hung device" problem that requries a reset to fix. Pat, I still don't understand where/what the problem(s) is(are) with ATAPI DMA operations. Yes, in any given Ultra DMA data burst the receiver of the data might receive a few extra bytes of data at the end of the burst but that is valid data... it is not extra data, it is not pad data, it is not a side effect... this data is just part of the total data transfer for the entire command. At the end of the last Ultra DMA data burst for the command there is no extra data, other than maybe a pad byte. This is because the sender of the data (host or device) knows how much data the current command transfers and the receiver of the data is expecting that amount of data (or in the case of commands like Request Sense, no more than some maximum amount of data). Where's the beef? (Sorry I just couldn't help myself.) *** Hale Landis *** www.ata-atapi.com *** Subscribe/Unsubscribe instructions can be found at www.t13.org.