Check the result after sending the packet, other error conditions like media
presence will be triggered there and we use FinishRequest() to catch those. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30250 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -140,12 +140,16 @@ ATAPIDevice::SendPacket(ATARequest *request)
|
|||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fChannel->Wait(ATA_STATUS_DATA_REQUEST, ATA_STATUS_BUSY,
|
result = fChannel->Wait(ATA_STATUS_DATA_REQUEST, ATA_STATUS_BUSY,
|
||||||
ATA_CHECK_ERROR_BIT | ATA_CHECK_DEVICE_FAULT,
|
ATA_CHECK_ERROR_BIT | ATA_CHECK_DEVICE_FAULT, request->Timeout());
|
||||||
request->Timeout()) != B_OK) {
|
if (result != B_OK) {
|
||||||
|
if (result == B_TIMED_OUT) {
|
||||||
TRACE_ERROR("timeout waiting for device to request data\n");
|
TRACE_ERROR("timeout waiting for device to request data\n");
|
||||||
request->SetStatus(SCSI_CMD_TIMEOUT);
|
request->SetStatus(SCSI_CMD_TIMEOUT);
|
||||||
return B_TIMED_OUT;
|
return B_TIMED_OUT;
|
||||||
|
} else
|
||||||
|
return fChannel->FinishRequest(request, ATA_WAIT_FINISH
|
||||||
|
| ATA_CHECK_DEVICE_FAULT, ATA_ERROR_ALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
// PIO data transfer
|
// PIO data transfer
|
||||||
|
|||||||
Reference in New Issue
Block a user