This message is from the T13 list server.

Hale, 

I don't see why setting ERR while DRQ=1 and BSY=0 is dangerous since the
status is read by host s/w at the _end_ of the transfer.  The spec has
always allowed ERR to be set with either BSY or DRQ set, which makes
sense because the error gets reported during the transfer and not after
it is terminated.  Allowing ERR to be set only after BSY=0 and DRQ=0
such behavior does cause a race condition for the host reading the
status and the device setting the ERR bit.  

Regards, MKE.


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hale
Landis
Sent: Monday, November 15, 2004 10:04 PM
To: T13 List Server
Subject: Re: [t13] e04155r0 - DRQ=0 When ERR=1 Feature

This message is from the T13 list server.


Curtis Stevens wrote:
> This message is from the T13 list server.
> Hale
> I would like you to please looks at 5.14.5.5 in ATA/ATAPI-7 v1 also
> please look at 5.14.5.7.  As you can see, the ERR bit can change when
DRQ or
> BSY is 1.  This is normal PATA operation as I understand it.  Further,
I
> believe these sections make it clear that DRQ does not require BSY=1
to
> change.

Yes, the ERR bit may change when BSY=1 (in fact, that is the only time 
the ERR bit should change from 0 to 1). Note that the ERR bit changes 
from 1 to 0 on a number of conditions in section 5.14.x (such as a write

to the Command register).

In section "5.14.5.1 BSY (Busy)" the following text is found:

    When BSY is cleared to zero, the host has control of the
    Command Block registers, the device shall:

    1) not set DRQ to one;

    2) not change ERR bit;

    3) not change the content of any other Command Block register;

    4) set the SERV bit to one when ready to continue an overlapped
    command that has been bus released.

    5) clear the DSC bit to zero when an action that uses this bit
    is completed.

Yes, when BSY=0 DRQ=1 the device may change the value of the ERR bit but

that would be dangerous because a host may not see that change (because 
it is not common for hosts to read status while in the middle of reading

/writing the data register during PIO data transfers.

And yes, the PIO Data In command protocol does specify that DRQ chagnes 
from 1 to 0 (without BSY=1) when the last word of the last DRQ data 
block is tranferred by the host.

And yes, the PIO Data Out and PACKET command protocols allow a device to

  change DRQ from 0 to 1 without BSY=1 but only immediately after the 
command register has been written (and not at any other time).

I hope this helps.

Hale

-- 

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

Reply via email to