Here is the promised diff that makes fec(4) call mii_tick() like all
our other ethernet drivers that use mii do.

Does this fix your problem Philip?


Index: sys/arch/armv7/imx/if_fec.c
===================================================================
RCS file: /cvs/src/sys/arch/armv7/imx/if_fec.c,v
retrieving revision 1.17
diff -u -p -r1.17 if_fec.c
--- sys/arch/armv7/imx/if_fec.c 21 Sep 2016 10:28:47 -0000      1.17
+++ sys/arch/armv7/imx/if_fec.c 21 Sep 2016 11:19:21 -0000
@@ -231,6 +231,7 @@ struct fec_softc {
        struct fec_buffer       *rx_buffer_base;
        int                     cur_tx;
        int                     cur_rx;
+       struct timeout          sc_tick;
 };
 
 struct fec_softc *fec_sc;
@@ -249,6 +250,7 @@ void fec_iff(struct fec_softc *);
 struct mbuf * fec_newbuf(void);
 int fec_intr(void *);
 void fec_recv(struct fec_softc *);
+void fec_tick(void *);
 int fec_miibus_readreg(struct device *, int, int);
 void fec_miibus_writereg(struct device *, int, int, int);
 void fec_miibus_statchg(struct device *);
@@ -430,6 +432,8 @@ fec_attach(struct device *parent, struct
        ether_ifattach(ifp);
        splx(s);
 
+       timeout_set(&sc->sc_tick, fec_tick, sc);
+
        fec_sc = sc;
        return;
 
@@ -966,6 +970,19 @@ done:
        HWRITE4(sc, ENET_RDAR, ENET_RDAR_RDAR);
 
        if_input(ifp, &ml);
+}
+
+void
+fec_tick(void *arg)
+{
+       struct fec_softc *sc = arg;
+       int s;
+
+       s = splnet();
+       mii_tick(&sc->sc_mii);
+       splx(s);
+
+       timeout_add_sec(&sc->sc_tick, 1);
 }
 
 /*

Reply via email to