This message is from the T13 list server.

All,

I would like to elaborate on the question opening this tread again:

Is the definition of "DRQ data block" crystal clear for all command
contexts in ATA/ATAPI-7 rev 4b?

Here is what I found in the READ SECTOR(S) command description:

----------------------------------
6.36.8 Description
This command reads from 1 to 256 sectors as specified in the Sector 
Count register. A sector count of 0 requests 256 sectors. The transfer 
shall begin at the sector specified in the LBA Low, LBA Mid, LBA High, 
and Device registers. The device shall interrupt for each DRQ block 
transferred.
----------------------------------

So what is the size of a "DRQ block" in the READ SECTOR(S) context?
Would you agree with me that it is one sector? But the "DRQ data
block" definition says:

----------------------------------
3.1.44 DRQ data block: A unit of data words transferred during a 
single assertion of DRQ when using PIO data transfer.
----------------------------------

IMHO, this is a definition that allows host and device designers to
easily disagree on the size of a DRQ data block.

IMHO, the READ MULTIPLE command has a better description:

----------------------------------
READ MULTIPLE
6.32.8 Description
This command reads the number of sectors specified in the Sector Count 
register. The number of sectors per block is defined by the content of 
word 59 in the IDENTIFY DEVICE data. The device shall interrupt for 
each DRQ block transferred.
----------------------------------

A DRQ data block is defined by the content of word 59 in the IDENTIFY
DEVICE data. This is true except for the last DRQ data block ... as we
all know.

Regards,
Alex.

> From: "Pat LaVarre" <[EMAIL PROTECTED]>
> Subject: Re: [t13] DRQ data block definition
> Date: Thu, 7 Jul 2005 03:42:51 -0700
> To: "forum at t13.org" <[email protected]>
> 
> This message is from the T13 list server.
> 
> 
> > Lets be a little more accurate...
> >
> > For traditional ATA/ATAPI devices a PIO DRQ data block is one of 
the 
> > following:
> > ...
> >
> > c) For ATAPI PACKET commands, the Command packet block is either 
12 or 
> > 16 bytes as indicated by ID word 0 from the device.
> >
> > d) For ATAPI PACKET commands, a Data packet block is between 2 and 
> > 65534 bytes as indicated by the Byte Count for the DRQ data packet 
and 
> > that Byte Count shall not exceed the Byte Count Limit set by the 
host 
> > for the execution of the PACKET command. A PACKET command may 
transfer 
> > any number of Data packet blocks of 2 bytes to 65534 bytes. Note 
that 
> > the last block may have a Byte Count of 1 - this transfers 1 data 
byte 
> > plus a pad byte.
> 
> Ouch.
> 
> I suppose we all also agree an ATAPI PIO DRQ block shouldn't have 3 
or 
> 65533 bytes, except the last block.
> 
> I'd say,
> 
> ATAPI DRQ blocks have a Byte Count of 0 to xFFFF bytes, which should 
> not be odd before the last block and should never be zero and should 
> never be xFFFF.  Some hosts works better by allowing the rudeness of 
an 
> odd or xFFFF Byte Count for any block and resetting any device rude 
> enough to ask for a block of 0 bytes.  Other hosts behave less 
> deterministically, e.g., hang when a device asks for a block of 0 
> bytes.
> 
> 


Reply via email to