make sure there are no pending interrupts during setup
This commit is contained in:
@@ -122,6 +122,10 @@ AHCIController::Init()
|
|||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// make sure interrupts are disabled
|
||||||
|
fRegs->ghc &= ~GHC_IE;
|
||||||
|
FlushPostedWrites();
|
||||||
|
|
||||||
if (ResetController() < B_OK) {
|
if (ResetController() < B_OK) {
|
||||||
TRACE("controller reset failed\n");
|
TRACE("controller reset failed\n");
|
||||||
goto err;
|
goto err;
|
||||||
@@ -194,6 +198,12 @@ AHCIController::Init()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// clear any pending interrupts
|
||||||
|
uint32 interruptsPending;
|
||||||
|
interruptsPending = fRegs->is;
|
||||||
|
fRegs->is = interruptsPending;
|
||||||
|
FlushPostedWrites();
|
||||||
|
|
||||||
// enable interrupts
|
// enable interrupts
|
||||||
fRegs->ghc |= GHC_IE;
|
fRegs->ghc |= GHC_IE;
|
||||||
FlushPostedWrites();
|
FlushPostedWrites();
|
||||||
|
|||||||
Reference in New Issue
Block a user