ref: 8773ea365f45626e66d5f0f5b056f83594aa8fba
parent: b9c1eaa2de919a6c1a323826eba1a9e63e3d149c
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Fri May 16 17:33:49 EDT 2014
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.
--- a/sys/src/9/pc/sdiahci.c
+++ b/sys/src/9/pc/sdiahci.c
@@ -723,7 +723,7 @@
h->ghc |= Hhr;
for(wait = 0; wait < 1000; wait += 100){- if(h->ghc == 0)
+ if((h->ghc & Hhr) == 0)
return 0;
delay(100);
}
--
⑨