Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Configure interrupt polarity before enabling PHY.
details: https://anonhg.NetBSD.org/src/rev/d92dcb42487f
branches: trunk
changeset: 336060:d92dcb42487f
user: slp <slp%NetBSD.org@localhost>
date: Mon Feb 09 07:53:39 2015 +0000
description:
Configure interrupt polarity before enabling PHY.
This prevents a interrupt storm when running under QEMU.
diffstat:
sys/dev/ic/lan9118.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r 065e74bc9208 -r d92dcb42487f sys/dev/ic/lan9118.c
--- a/sys/dev/ic/lan9118.c Mon Feb 09 07:50:24 2015 +0000
+++ b/sys/dev/ic/lan9118.c Mon Feb 09 07:53:39 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lan9118.c,v 1.17 2014/08/10 16:44:35 tls Exp $ */
+/* $NetBSD: lan9118.c,v 1.18 2015/02/09 07:53:39 slp Exp $ */
/*
* Copyright (c) 2008 KIYOHARA Takashi
* All rights reserved.
@@ -25,7 +25,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lan9118.c,v 1.17 2014/08/10 16:44:35 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lan9118.c,v 1.18 2015/02/09 07:53:39 slp Exp $");
/*
* The LAN9118 Family
@@ -169,6 +169,10 @@
return EINVAL;
}
+ /* Configure interrupt polarity */
+ bus_space_write_4(sc->sc_iot, sc->sc_ioh, LAN9118_IRQ_CFG,
+ LAN9118_IRQ_CFG_IRQ_TYPE | LAN9118_IRQ_CFG_IRQ_POL);
+
val = bus_space_read_4(sc->sc_iot, sc->sc_ioh, LAN9118_ID_REV);
sc->sc_id = LAN9118_ID_REV_ID(val);
sc->sc_rev = LAN9118_ID_REV_REV(val);
Home |
Main Index |
Thread Index |
Old Index