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:
@@ -577,11 +577,22 @@ ATAChannel::RecoverLostInterrupt()
|
|||||||
status_t
|
status_t
|
||||||
ATAChannel::SendRequest(ATARequest *request, uint32 flags)
|
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");
|
TRACE_FUNCTION("\n");
|
||||||
ATADevice *device = request->Device();
|
ATADevice *device = request->Device();
|
||||||
if (device->Select() != B_OK || WaitForIdle() != B_OK) {
|
|
||||||
// resetting the device here will discard current configuration,
|
TRACE("SendRequest status 0x%02x\n", AltStatus());
|
||||||
// it's better when the SCSI bus manager requests an external reset.
|
|
||||||
|
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");
|
TRACE_ERROR("device selection timeout\n");
|
||||||
request->SetStatus(SCSI_SEL_TIMEOUT);
|
request->SetStatus(SCSI_SEL_TIMEOUT);
|
||||||
return B_TIMED_OUT;
|
return B_TIMED_OUT;
|
||||||
|
|||||||
Reference in New Issue
Block a user