summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2010-07-20 19:24:32 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2010-07-20 19:24:32 +0000
commit59df56c625733efd50a048290457d407c6045422 (patch)
tree06f533f317829dd828aee7028dc1047e0a062520 /sys/dev/pci
parentaafecd1a09c1c2a94ac5dfdfc494ff71f62a40dc (diff)
do not timeout when stopping DMA channels.
from a similar fix to iwlwifi
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/if_iwn.c6
-rw-r--r--sys/dev/pci/if_iwnreg.h5
2 files changed, 4 insertions, 7 deletions
diff --git a/sys/dev/pci/if_iwn.c b/sys/dev/pci/if_iwn.c
index 744700e7691..f575400d320 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.97 2010/06/05 18:52:47 damien Exp $ */
+/* $OpenBSD: if_iwn.c,v 1.98 2010/07/20 19:24:31 damien Exp $ */
/*-
* Copyright (c) 2007-2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -5676,7 +5676,6 @@ iwn_hw_stop(struct iwn_softc *sc)
{
const struct iwn_hal *hal = sc->sc_hal;
int chnl, qid, ntries;
- uint32_t tmp;
IWN_WRITE(sc, IWN_RESET, IWN_RESET_NEVO);
@@ -5697,8 +5696,7 @@ iwn_hw_stop(struct iwn_softc *sc)
for (chnl = 0; chnl < hal->ndmachnls; chnl++) {
IWN_WRITE(sc, IWN_FH_TX_CONFIG(chnl), 0);
for (ntries = 0; ntries < 200; ntries++) {
- tmp = IWN_READ(sc, IWN_FH_TX_STATUS);
- if ((tmp & IWN_FH_TX_STATUS_IDLE(chnl)) ==
+ if (IWN_READ(sc, IWN_FH_TX_STATUS) &
IWN_FH_TX_STATUS_IDLE(chnl))
break;
DELAY(10);
diff --git a/sys/dev/pci/if_iwnreg.h b/sys/dev/pci/if_iwnreg.h
index ca9e1aaf131..d941e62c286 100644
--- a/sys/dev/pci/if_iwnreg.h
+++ b/sys/dev/pci/if_iwnreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwnreg.h,v 1.40 2010/05/05 19:41:57 damien Exp $ */
+/* $OpenBSD: if_iwnreg.h,v 1.41 2010/07/20 19:24:31 damien Exp $ */
/*-
* Copyright (c) 2007, 2008
@@ -285,8 +285,7 @@
#define IWN_FH_TX_CHICKEN_SCHED_RETRY (1 << 1)
/* Possible flags for register IWN_FH_TX_STATUS. */
-#define IWN_FH_TX_STATUS_IDLE(chnl) \
- (1 << ((chnl) + 24) | 1 << ((chnl) + 16))
+#define IWN_FH_TX_STATUS_IDLE(chnl) (1 << ((chnl) + 16))
/* Possible flags for register IWN_FH_RX_CONFIG. */
#define IWN_FH_RX_CONFIG_ENA (1 << 31)