Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mips/alchemy/dev Enable interrupt in aumac_init(). ...
details: https://anonhg.NetBSD.org/src/rev/c92cc5ef9467
branches: trunk
changeset: 779331:c92cc5ef9467
user: kiyohara <kiyohara%NetBSD.org@localhost>
date: Sat May 19 15:17:35 2012 +0000
description:
Enable interrupt in aumac_init(). And disable in aumac_stop()/aumac_attach().
Interrupt storm happen if received packet and DMA not set.
diffstat:
sys/arch/mips/alchemy/dev/if_aumac.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (52 lines):
diff -r 8b838e11e9d1 -r c92cc5ef9467 sys/arch/mips/alchemy/dev/if_aumac.c
--- a/sys/arch/mips/alchemy/dev/if_aumac.c Sat May 19 14:47:37 2012 +0000
+++ b/sys/arch/mips/alchemy/dev/if_aumac.c Sat May 19 15:17:35 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_aumac.c,v 1.34 2012/02/02 19:42:59 tls Exp $ */
+/* $NetBSD: if_aumac.c,v 1.35 2012/05/19 15:17:35 kiyohara Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_aumac.c,v 1.34 2012/02/02 19:42:59 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_aumac.c,v 1.35 2012/05/19 15:17:35 kiyohara Exp $");
@@ -123,6 +123,7 @@
struct ethercom sc_ethercom; /* Ethernet common data */
void *sc_sdhook; /* shutdown hook */
+ int sc_irq;
void *sc_ih; /* interrupt cookie */
struct mii_data sc_mii; /* MII/media information */
@@ -272,6 +273,8 @@
"unable to register interrupt handler\n");
return;
}
+ sc->sc_irq = aa->aa_irq[0];
+ au_intr_disable(sc->sc_irq);
/*
* Allocate space for the transmit and receive buffers.
@@ -808,6 +811,7 @@
ifp->if_flags |= IFF_RUNNING;
ifp->if_flags &= ~IFF_OACTIVE;
+ au_intr_enable(sc->sc_irq);
out:
if (error)
printf("%s: interface not running\n", device_xname(sc->sc_dev));
@@ -836,6 +840,8 @@
/* Power down/reset the MAC. */
aumac_powerdown(sc);
+ au_intr_disable(sc->sc_irq);
+
/* Mark the interface as down and cancel the watchdog timer. */
ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
ifp->if_timer = 0;
Home |
Main Index |
Thread Index |
Old Index