From 802bd0d4d149b18a7b39c57fadfcd5236257d9e9 Mon Sep 17 00:00:00 2001 From: Damien Bergamini Date: Wed, 27 Oct 2004 21:24:50 +0000 Subject: Minor consistency tweaks (imported from iwi). Wait longer for microcode initialization to complete. --- sys/dev/pci/if_ipw.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'sys/dev/pci') 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; } -- cgit v1.2.3