According to ATA-4 specification, the error and device-fault

bit (and all other status register bits) are only valid when
the busy bit is zero. This makes PIO mode work on a WD Raptor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30443 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Marcus Overhagen 2009-04-26 21:02:16 +00:00
parent 380ed9afdd
commit 4a2e45ea36

View File

@ -394,12 +394,14 @@ ATAChannel::Wait(uint8 setBits, uint8 clearedBits, uint32 flags,
while (true) {
uint8 status = AltStatus();
if ((flags & ATA_CHECK_ERROR_BIT) != 0
&& (status & ATA_STATUS_BUSY) == 0
&& (status & ATA_STATUS_ERROR) != 0) {
TRACE("error bit set while waiting\n");
return B_ERROR;
}
if ((flags & ATA_CHECK_DEVICE_FAULT) != 0
&& (status & ATA_STATUS_BUSY) == 0
&& (status & ATA_STATUS_DEVICE_FAULT) != 0) {
TRACE("device fault bit set while waiting\n");
return B_ERROR;