If the start bit, PxCMD.ST, is cleared and nothing is in-flight then
PxCI, PxSACT, PxCMD.CCS and PxCMD.CR should be 0. Reviewed by: grehan
This commit is contained in:
parent
a0cc5254d9
commit
26bf96112b
@ -367,11 +367,15 @@ ahci_check_stopped(struct ahci_port *p)
|
||||
{
|
||||
/*
|
||||
* If we are no longer processing the command list and nothing
|
||||
* is in-flight, clear the running bit.
|
||||
* is in-flight, clear the running bit, the current command
|
||||
* slot, the command issue and active bits.
|
||||
*/
|
||||
if (!(p->cmd & AHCI_P_CMD_ST)) {
|
||||
if (p->pending == 0)
|
||||
if (p->pending == 0) {
|
||||
p->cmd &= ~(AHCI_P_CMD_CR | AHCI_P_CMD_CCS_MASK);
|
||||
p->ci = 0;
|
||||
p->sact = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user