Add more debug code. I see spurius device selection timeouts.

When this happens, no recovery is possible right now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32989 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Marcus Overhagen 2009-09-07 23:52:58 +00:00
parent c43d83c81a
commit f4f2f6f565

View File

@ -577,11 +577,22 @@ ATAChannel::RecoverLostInterrupt()
status_t
ATAChannel::SendRequest(ATARequest *request, uint32 flags)
{
// TODO: implement this:
// resetting the device here would discard current configuration,
// it's better when the SCSI bus manager requests an external reset.
TRACE_FUNCTION("\n");
ATADevice *device = request->Device();
if (device->Select() != B_OK || WaitForIdle() != B_OK) {
// resetting the device here will discard current configuration,
// it's better when the SCSI bus manager requests an external reset.
TRACE("SendRequest status 0x%02x\n", AltStatus());
if (device->Select() != B_OK) {
TRACE_ERROR("device selection failed\n");
request->SetStatus(SCSI_SEL_TIMEOUT);
return B_TIMED_OUT;
}
if (WaitForIdle() != B_OK) {
TRACE_ERROR("device selection timeout\n");
request->SetStatus(SCSI_SEL_TIMEOUT);
return B_TIMED_OUT;