From: damien Date: Thu, 31 Jul 2008 20:14:17 +0000 (+0000) Subject: Wait much longer for clock stabilization. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=83e750a146cfe5682be6b61dd9cbbb2c389a8db1;p=openbsd Wait much longer for clock stabilization. From jcs@ and in accordance with what the Intel Linux driver does. --- diff --git a/sys/dev/pci/if_iwn.c b/sys/dev/pci/if_iwn.c index b529990d5ee..1c6b846a55d 100644 --- a/sys/dev/pci/if_iwn.c +++ b/sys/dev/pci/if_iwn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwn.c,v 1.21 2008/07/21 18:43:19 damien Exp $ */ +/* $OpenBSD: if_iwn.c,v 1.22 2008/07/31 20:14:17 damien Exp $ */ /*- * Copyright (c) 2007,2008 @@ -3447,12 +3447,12 @@ iwn_reset(struct iwn_softc *sc) IWN_WRITE(sc, IWN_GPIO_CTL, tmp | IWN_GPIO_INIT); /* wait for clock stabilization */ - for (ntries = 0; ntries < 1000; ntries++) { + for (ntries = 0; ntries < 25000; ntries++) { if (IWN_READ(sc, IWN_GPIO_CTL) & IWN_GPIO_CLOCK) break; - DELAY(10); + DELAY(100); } - if (ntries == 1000) { + if (ntries == 25000) { printf("%s: timeout waiting for clock stabilization\n", sc->sc_dev.dv_xname); return ETIMEDOUT; diff --git a/sys/dev/pci/if_wpi.c b/sys/dev/pci/if_wpi.c index f7e7742ffa6..e1030d61273 100644 --- a/sys/dev/pci/if_wpi.c +++ b/sys/dev/pci/if_wpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wpi.c,v 1.62 2008/07/21 18:43:19 damien Exp $ */ +/* $OpenBSD: if_wpi.c,v 1.63 2008/07/31 20:14:17 damien Exp $ */ /*- * Copyright (c) 2006, 2007 @@ -2725,12 +2725,12 @@ wpi_reset(struct wpi_softc *sc) WPI_WRITE(sc, WPI_GPIO_CTL, tmp | WPI_GPIO_INIT); /* wait for clock stabilization */ - for (ntries = 0; ntries < 1000; ntries++) { + for (ntries = 0; ntries < 25000; ntries++) { if (WPI_READ(sc, WPI_GPIO_CTL) & WPI_GPIO_CLOCK) break; - DELAY(10); + DELAY(100); } - if (ntries == 1000) { + if (ntries == 25000) { printf("%s: timeout waiting for clock stabilization\n", sc->sc_dev.dv_xname); return ETIMEDOUT;