Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Fix MII setup and interrupt handling, from Robert...
details: https://anonhg.NetBSD.org/src/rev/d1bb0d09d873
branches: trunk
changeset: 332155:d1bb0d09d873
user: martin <martin%NetBSD.org@localhost>
date: Tue Sep 09 07:18:35 2014 +0000
description:
Fix MII setup and interrupt handling, from Robert Swindell.
diffstat:
sys/dev/ic/dwc_gmac.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (33 lines):
diff -r d5ec9b50b738 -r d1bb0d09d873 sys/dev/ic/dwc_gmac.c
--- a/sys/dev/ic/dwc_gmac.c Tue Sep 09 06:51:00 2014 +0000
+++ b/sys/dev/ic/dwc_gmac.c Tue Sep 09 07:18:35 2014 +0000
@@ -39,7 +39,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.1 2014/09/08 14:24:32 martin Exp $");
+__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.2 2014/09/09 07:18:35 martin Exp $");
#include "opt_inet.h"
@@ -162,6 +162,7 @@
/*
* Attach MII subdevices
*/
+ sc->sc_ec.ec_mii = &sc->sc_mii;
ifmedia_init(&mii->mii_media, 0, ether_mediachange, ether_mediastatus);
mii->mii_ifp = ifp;
mii->mii_readreg = dwc_gmac_miibus_read_reg;
@@ -793,9 +794,11 @@
uint32_t status, dma_status;
status = bus_space_read_4(sc->sc_bst, sc->sc_bsh, AWIN_GMAC_MAC_INTR);
- if (status & AWIN_GMAC_MII_IRQ)
+ if (status & AWIN_GMAC_MII_IRQ) {
(void)bus_space_read_4(sc->sc_bst, sc->sc_bsh,
AWIN_GMAC_MII_STATUS);
+ mii_pollstat(&sc->sc_mii);
+ }
dma_status = bus_space_read_4(sc->sc_bst, sc->sc_bsh,
AWIN_GMAC_DMA_STATUS);
Home |
Main Index |
Thread Index |
Old Index