FreeBSD-5.x removed the 'read interrupt arrived early' check code, for
authorMatthew Dillon <dillon@dragonflybsd.org>
Mon, 29 Dec 2003 03:42:43 +0000 (03:42 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Mon, 29 Dec 2003 03:42:43 +0000 (03:42 +0000)
commit135468aaff00b27632bd1c6847deab768e26301d
tree3e5f4f151c7e6216a254deb5e1605857ad2afca7
parentcafd601ba30610746f3a73a6a7a412d56d689a48
FreeBSD-5.x removed the 'read interrupt arrived early' check code, for
undocumented reasons.  As far as I can tell, only the ATA_S_READY bit needs
to be set when a read interrupt arrives for a PIO read operation so reduce
the test from ATA_S_READY|ATA_S_DSC|ATA_S_DRQ to just ATA_S_READY.

Change the ATA RESET timing.  Instead of polling up to 310000 times in 100uS
intervals poll 3100 times in 10000uS intervals.  Note that 5.x polls 310
times in 100ms intervals, which is silly (an unnecessarily long polling
delay).

Add a mandatory 50ms delay after all BUSY bits have been released.  Some
ATA devices release BUSY before they are ready to accept commands.  Note
that the ATA code waits 100ms after releasing RESET, before checking BUSY,
which is probably overkill, but this does not cover the mandatory delay
that must occur after BUSY is observed to have been released.

(This patch primarily removes bogus 'read interrupt arrived early' warnings
on the console for things like CF card IDE adapters and other badly designed
IDE devices).
sys/dev/disk/ata/ata-all.c
sys/dev/disk/ata/ata-disk.c