summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2008-07-31 20:14:18 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2008-07-31 20:14:18 +0000
commitdf00817da2134d2dd51c2b0650170ba331838708 (patch)
treea670b3c86e2dc46051ffa3f8ef13457eda49ceea
parentdaf52ae7d678fa3f43b85be9091b54cbcd05a4fe (diff)
Wait much longer for clock stabilization.
From jcs@ and in accordance with what the Intel Linux driver does.
-rw-r--r--sys/dev/pci/if_iwn.c8
-rw-r--r--sys/dev/pci/if_wpi.c8
2 files changed, 8 insertions, 8 deletions
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;