From af6d793d9f45ee17ca5fe76b3f98bc830796553c Mon Sep 17 00:00:00 2001 From: mglocker Date: Sun, 27 Jul 2008 13:02:37 +0000 Subject: [PATCH] Some devices take longer to load the firmware. Increase the firmware load timeout from 50000us to 500000us. Reported and tested by William Dunand with an I-O DATA WN-G54/CF device. Since this device works now, we add it to the man page. --- share/man/man4/malo.4 | 5 +++-- sys/dev/pcmcia/if_malo.c | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/share/man/man4/malo.4 b/share/man/man4/malo.4 index fb812871685..584969a023f 100644 --- a/share/man/man4/malo.4 +++ b/share/man/man4/malo.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: malo.4,v 1.25 2008/04/17 14:01:22 jmc Exp $ +.\" $OpenBSD: malo.4,v 1.26 2008/07/27 13:02:38 mglocker Exp $ .\" .\" Copyright (c) 2006 Theo de Raadt. .\" @@ -26,7 +26,7 @@ .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd $Mdocdate: April 17 2008 $ +.Dd $Mdocdate: July 27 2008 $ .Os .Dt MALO 4 .Sh NAME @@ -123,6 +123,7 @@ driver: .Bl -column -compact "Microcom Travelcard" "MALO111" "CardBus" "a/b/g" -offset 6n .Em "Card Chip Bus Standard" Ambicom WL54CF 88W8385 PCMCIA b/g +I-O DATA WN-G54/CF 88W8385 PCMCIA b/g Netgear WG511v2 88W8310 CardBus b/g Netgear WG311v3 88W8335 PCI b/g Tenda TWL541C 88W8310 CardBus b/g diff --git a/sys/dev/pcmcia/if_malo.c b/sys/dev/pcmcia/if_malo.c index a994926f7cc..3ae1102cb25 100644 --- a/sys/dev/pcmcia/if_malo.c +++ b/sys/dev/pcmcia/if_malo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_malo.c,v 1.61 2007/10/09 20:41:22 mglocker Exp $ */ +/* $OpenBSD: if_malo.c,v 1.62 2008/07/27 13:02:37 mglocker Exp $ */ /* * Copyright (c) 2007 Marcus Glocker @@ -606,13 +606,13 @@ cmalo_fw_load_main(struct malo_softc *sc) DPRINTF(1, "%s: main FW downloaded\n", sc->sc_dev.dv_xname); /* verify if the main firmware has been loaded correctly */ - for (i = 0; i < 50; i++) { + for (i = 0; i < 500; i++) { if (MALO_READ_1(sc, MALO_REG_SCRATCH) == MALO_VAL_SCRATCH_FW_LOADED) break; delay(1000); } - if (i == 50) { + if (i == 500) { printf("%s: main FW not loaded!\n", sc->sc_dev.dv_xname); return (EIO); } -- 2.20.1