summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2004-10-27 21:24:50 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2004-10-27 21:24:50 +0000
commit802bd0d4d149b18a7b39c57fadfcd5236257d9e9 (patch)
tree16bd60bfd4e66937ad30e11541aaf00cc8988696 /sys/dev/pci
parentdb76883511da648df3854e7c4eb4b3435da3cf0d (diff)
Minor consistency tweaks (imported from iwi).
Wait longer for microcode initialization to complete.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/if_ipw.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/sys/dev/pci/if_ipw.c b/sys/dev/pci/if_ipw.c
index 3aec82a378c..0e894c292b9 100644
--- a/sys/dev/pci/if_ipw.c
+++ b/sys/dev/pci/if_ipw.c
@@ -1,4 +1,4 @@
-/* $Id: if_ipw.c,v 1.15 2004/10/27 21:23:45 damien Exp $ */
+/* $Id: if_ipw.c,v 1.16 2004/10/27 21:24:49 damien Exp $ */
/*-
* Copyright (c) 2004
@@ -1600,7 +1600,7 @@ ipw_load_ucode(struct ipw_softc *sc, u_char *uc, int size)
{
int ntries;
- MEM_WRITE_4(sc, 0x003000e0, 0x80000000);
+ MEM_WRITE_4(sc, 0x3000e0, 0x80000000);
CSR_WRITE_4(sc, IPW_CSR_RST, 0);
MEM_WRITE_2(sc, 0x220000, 0x0703);
@@ -1628,15 +1628,18 @@ ipw_load_ucode(struct ipw_softc *sc, u_char *uc, int size)
MEM_WRITE_1(sc, 0x210000, 0x00);
MEM_WRITE_1(sc, 0x210000, 0x80);
- for (ntries = 0; ntries < 10; ntries++) {
+ for (ntries = 0; ntries < 100; ntries++) {
if (MEM_READ_1(sc, 0x210000) & 1)
break;
- DELAY(10);
+ DELAY(1000);
}
- if (ntries == 10)
+ if (ntries == 100) {
+ printf("%s: timeout waiting for ucode to initialize\n",
+ sc->sc_dev.dv_xname);
return EIO;
+ }
- MEM_WRITE_4(sc, 0x003000e0, 0);
+ MEM_WRITE_4(sc, 0x3000e0, 0);
return 0;
}