diff --git a/sys/dev/usb/net/if_axge.c b/sys/dev/usb/net/if_axge.c index eb025c72a802..348b9372a19a 100644 --- a/sys/dev/usb/net/if_axge.c +++ b/sys/dev/usb/net/if_axge.c @@ -303,8 +303,6 @@ axge_miibus_writereg(device_t dev, int phy, int reg, int val) int locked; sc = device_get_softc(dev); - if (sc->sc_phyno != phy) - return (0); locked = mtx_owned(&sc->sc_mtx); if (!locked) AXGE_LOCK(sc); @@ -434,7 +432,6 @@ axge_attach_post(struct usb_ether *ue) struct axge_softc *sc; sc = uether_getsc(ue); - sc->sc_phyno = 3; /* Initialize controller and get station address. */ axge_chip_init(sc); @@ -466,7 +463,7 @@ axge_attach_post_sub(struct usb_ether *ue) mtx_lock(&Giant); error = mii_attach(ue->ue_dev, &ue->ue_miibus, ifp, uether_ifmedia_upd, ue->ue_methods->ue_mii_sts, - BMSR_DEFCAPMASK, sc->sc_phyno, MII_OFFSET_ANY, MIIF_DOPAUSE); + BMSR_DEFCAPMASK, AXGE_PHY_ADDR, MII_OFFSET_ANY, MIIF_DOPAUSE); mtx_unlock(&Giant); return (error); diff --git a/sys/dev/usb/net/if_axgereg.h b/sys/dev/usb/net/if_axgereg.h index 1825d3b0994b..f3bd603fdd16 100644 --- a/sys/dev/usb/net/if_axgereg.h +++ b/sys/dev/usb/net/if_axgereg.h @@ -158,11 +158,12 @@ enum { AXGE_N_TRANSFER, }; +#define AXGE_PHY_ADDR 3 + struct axge_softc { struct usb_ether sc_ue; struct mtx sc_mtx; struct usb_xfer *sc_xfer[AXGE_N_TRANSFER]; - int sc_phyno; int sc_flags; #define AXGE_FLAG_LINK 0x0001 /* got a link */