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:
cinap_lenrek 2014-05-16 21:33:49 +02:00
parent eb687adecd
commit b3eeb59964

View file

@ -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);
}