sdiahci: fix (unused) hba reset function (thanks erik quanstro)
from the specification: software may reset the entire HBA by setting GHC.HR to '1'. When software sets the GHC.HR bit to '1', the HBA shall perform an internal reset action. The bit shall be cleared to '0' by the HBA when the reset is complete.
This commit is contained in:
parent
eb687adecd
commit
b3eeb59964
1 changed files with 1 additions and 1 deletions
|
@ -723,7 +723,7 @@ ahcihbareset(Ahba *h)
|
|||
|
||||
h->ghc |= Hhr;
|
||||
for(wait = 0; wait < 1000; wait += 100){
|
||||
if(h->ghc == 0)
|
||||
if((h->ghc & Hhr) == 0)
|
||||
return 0;
|
||||
delay(100);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue