summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2009-11-23 19:54:55 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2009-11-23 19:54:55 +0000
commitea64b95342840bfea50f8f7650624dddd8957c31 (patch)
tree2f9f58078c7386c6afde8353253081f1d3097622 /sys/dev/ic
parente0517e3c1088985b95021bf0319a79a3e4040b83 (diff)
prevent interrupts storm when the radio switch is turned off while
the interface is up and running by properly clearing the condition.
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/athn.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/ic/athn.c b/sys/dev/ic/athn.c
index 9e578d2bdbc..845ba267460 100644
--- a/sys/dev/ic/athn.c
+++ b/sys/dev/ic/athn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: athn.c,v 1.17 2009/11/23 19:11:06 damien Exp $ */
+/* $OpenBSD: athn.c,v 1.18 2009/11/23 19:54:54 damien Exp $ */
/*-
* Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr>
@@ -4727,6 +4727,9 @@ athn_stop(struct ifnet *ifp, int disable)
/* Disable interrupts. */
athn_disable_interrupts(sc);
+ /* Acknowledge interrupts (avoids interrupt storms.) */
+ AR_WRITE(sc, AR_INTR_SYNC_CAUSE, 0xffffffff);
+ AR_WRITE(sc, AR_INTR_SYNC_MASK, 0);
for (qid = 0; qid < ATHN_QID_COUNT; qid++)
athn_stop_tx_dma(sc, qid);