Module Name: src Committed By: slp Date: Mon Feb 9 07:53:39 UTC 2015
Modified Files: src/sys/dev/ic: lan9118.c Log Message: Configure interrupt polarity before enabling PHY. This prevents a interrupt storm when running under QEMU. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/dev/ic/lan9118.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/ic/lan9118.c diff -u src/sys/dev/ic/lan9118.c:1.17 src/sys/dev/ic/lan9118.c:1.18 --- src/sys/dev/ic/lan9118.c:1.17 Sun Aug 10 16:44:35 2014 +++ src/sys/dev/ic/lan9118.c Mon Feb 9 07:53:39 2015 @@ -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 @@ lan9118_attach(struct lan9118_softc *sc) 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);