Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys SVN r220966 from FreeBSD:
details: https://anonhg.NetBSD.org/src/rev/bf1717148796
branches: trunk
changeset: 771669:bf1717148796
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Mon Nov 28 00:30:17 2011 +0000
description:
SVN r220966 from FreeBSD:
Fix a corner-case of interrupt handling which resulted in potentially
spurious (and fatal) interrupt errors.
diffstat:
sys/dev/ic/ath.c | 6 +++---
sys/external/isc/atheros_hal/dist/ar5416/ar5416_interrupts.c | 9 +++++----
2 files changed, 8 insertions(+), 7 deletions(-)
diffs (61 lines):
diff -r e5b1ec5575d6 -r bf1717148796 sys/dev/ic/ath.c
--- a/sys/dev/ic/ath.c Sun Nov 27 21:38:17 2011 +0000
+++ b/sys/dev/ic/ath.c Mon Nov 28 00:30:17 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ath.c,v 1.112 2011/10/07 16:58:11 dyoung Exp $ */
+/* $NetBSD: ath.c,v 1.113 2011/11/28 00:30:17 jmcneill Exp $ */
/*-
* Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
@@ -41,7 +41,7 @@
__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.104 2005/09/16 10:09:23 ru Exp $");
#endif
#ifdef __NetBSD__
-__KERNEL_RCSID(0, "$NetBSD: ath.c,v 1.112 2011/10/07 16:58:11 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ath.c,v 1.113 2011/11/28 00:30:17 jmcneill Exp $");
#endif
/*
@@ -740,7 +740,7 @@
struct ath_softc *sc = arg;
struct ifnet *ifp = &sc->sc_if;
struct ath_hal *ah = sc->sc_ah;
- HAL_INT status;
+ HAL_INT status = 0;
if (!device_activation(sc->sc_dev, DEVACT_LEVEL_DRIVER)) {
/*
diff -r e5b1ec5575d6 -r bf1717148796 sys/external/isc/atheros_hal/dist/ar5416/ar5416_interrupts.c
--- a/sys/external/isc/atheros_hal/dist/ar5416/ar5416_interrupts.c Sun Nov 27 21:38:17 2011 +0000
+++ b/sys/external/isc/atheros_hal/dist/ar5416/ar5416_interrupts.c Mon Nov 28 00:30:17 2011 +0000
@@ -14,7 +14,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: ar5416_interrupts.c,v 1.2 2011/03/07 11:25:44 cegger Exp $
+ * $Id: ar5416_interrupts.c,v 1.3 2011/11/28 00:30:17 jmcneill Exp $
*/
#include "opt_ah.h"
@@ -55,6 +55,8 @@
* values. The value returned is mapped to abstract the hw-specific bit
* locations in the Interrupt Status Register.
*
+ * (*masked) is cleared on initial call.
+ *
* Returns: A hardware-abstracted bitmap of all non-masked-out
* interrupts pending, as well as an unmasked value
*/
@@ -73,10 +75,9 @@
isr = 0;
sync_cause = OS_REG_READ(ah, AR_INTR_SYNC_CAUSE);
sync_cause &= AR_INTR_SYNC_DEFAULT;
- if (isr == 0 && sync_cause == 0) {
- *masked = 0;
+ *masked = 0;
+ if (isr == 0 && sync_cause == 0)
return AH_FALSE;
- }
if (isr != 0) {
struct ath_hal_5212 *ahp = AH5212(ah);
Home |
Main Index |
Thread Index |
Old Index