This is what I thought too Jim.
The case(s) I've seen are with atapi optical drives. I've seen
them on a number of occasions after a reset set BSY, momentarily
clear BSY, then set BSY again for a period of time. I've seen drives
complete resets, accept commands and complete them, then arbitrarily
set BSY on their own, apparently while scanning the media to identify
it.
It's not a case of needing to wait 400ns after device selection
either.
The hard part is catching such things during qualification.
Sometimes the tests you do in qual don't happen with the exact timing
needed to hit the weird condition. Then down the road a few
months or years, software changes and then something weird like this
pops up.
Section 7.15.6.1 (revision 5), where it explicitly lists the conditions under which BSY can be set to 1 by the device:
Reset: "after either the negation of RESET- or the setting of the SRST bit to one in the Device Control register;"
Start of some commands: "after writing the Command register if the DRQ bit is not set to one;"
Pacing of PIO data transfer: "between blocks of a data transfer during PIO data-in commands before the DRQ bit is cleared to zero;"
Special case in PIO data transfer: "after the transfer of a data block during PIO data-out commands before the DRQ bit is cleared to zero;"
Multiword DMA (cannot access registers in Ultra DMA mode, as per table 10): "during the data transfer of DMA commands either the BSY bit , the DRQ bit, or both shall be set to one;"
Start of ATAPI command execution: "after the command packet is received during the execution of a PACKET command."
As Hale points out, the discussed action is illegal unless it is occurring during one of the above. Specifically, there is no general purpose rule that you set BSY=1 when changing the value of a bit in the Status register. Indeed, why would there be a need for it in this case anyway? (i.e. nothing breaks if you do not set BSY=1).
Jim
--
---------------------
"Anything you CAN control you MUST control."
Wendy Carlos
---------------------
Larry Barras
Apple Computer Inc.
1 Infinite Loop
MS: 306-2TC
Cupertino, CA 95014
(408) 974-3220
---------------------
"Anything you CAN control you MUST control."
Wendy Carlos
---------------------
Larry Barras
Apple Computer Inc.
1 Infinite Loop
MS: 306-2TC
Cupertino, CA 95014
(408) 974-3220
