summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2014-05-16 21:33:49 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2014-05-16 21:33:49 +0200
commitb3eeb599641a85a06ef039cf495d4ce2b7fac258 (patch)
tree37f7f7c17ed8801b5fea6c0c8ebbc3eeb5897683
parenteb687adecd365876d6b6918a9ee4f8e8e7f205f6 (diff)
downloadplan9front-b3eeb599641a85a06ef039cf495d4ce2b7fac258.tar.xz
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.
-rw-r--r--sys/src/9/pc/sdiahci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/9/pc/sdiahci.c b/sys/src/9/pc/sdiahci.c
index 2e1d6e0bc..159ee1607 100644
--- a/sys/src/9/pc/sdiahci.c
+++ b/sys/src/9/pc/sdiahci.c
@@ -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);
}