diff --git a/sys/dev/mii/mii.c b/sys/dev/mii/mii.c index 065bc5de4f18..11610e9eea7a 100644 --- a/sys/dev/mii/mii.c +++ b/sys/dev/mii/mii.c @@ -339,6 +339,7 @@ mii_phy_probe(device_t dev, device_t *child, ifm_change_cb_t ifmedia_upd, for (i = 0; i < MII_NPHY; i++) { bmsr = MIIBUS_READREG(dev, i, MII_BMSR); + printf("BMSR(%d) is %#x\n", i, bmsr); if (bmsr == 0 || bmsr == 0xffff || (bmsr & (BMSR_EXTSTAT|BMSR_MEDIAMASK)) == 0) { /* Assume no PHY at this address. */ diff --git a/sys/dev/mii/mlphy.c b/sys/dev/mii/mlphy.c index d0a549cc6754..9eba9da899e0 100644 --- a/sys/dev/mii/mlphy.c +++ b/sys/dev/mii/mlphy.c @@ -194,6 +194,7 @@ mlphy_service(xsc, mii, cmd) * See if there's another PHY on this bus with us. * If so, we may need it for 10Mbps modes. */ + devs = 0; device_get_children(msc->ml_mii.mii_dev, &devlist, &devs); for (i = 0; i < devs; i++) { if (strcmp(device_get_name(devlist[i]), "mlphy")) { @@ -400,6 +401,7 @@ mlphy_status(sc) int devs, i; /* See if there's another PHY on the bus with us. */ + devs = 0; device_get_children(msc->ml_mii.mii_dev, &devlist, &devs); for (i = 0; i < devs; i++) { if (strcmp(device_get_name(devlist[i]), "mlphy")) { diff --git a/sys/dev/mii/tlphy.c b/sys/dev/mii/tlphy.c index d21fe7f910e0..6a603c299562 100644 --- a/sys/dev/mii/tlphy.c +++ b/sys/dev/mii/tlphy.c @@ -163,6 +163,7 @@ tlphy_attach(device_t dev) capmask = 0xFFFFFFFF; if (mii->mii_instance) { + devs = 0; device_get_children(sc->sc_mii.mii_dev, &devlist, &devs); for (i = 0; i < devs; i++) { if (strcmp(device_get_name(devlist[i]), "tlphy")) {