diff --git a/sys/dev/mii/ukphy.c b/sys/dev/mii/ukphy.c --- a/sys/dev/mii/ukphy.c +++ b/sys/dev/mii/ukphy.c @@ -120,10 +120,26 @@ ukphy_attach(device_t dev) { struct mii_softc *sc; + uint32_t reg; sc = device_get_softc(dev); mii_phy_dev_attach(dev, MIIF_NOMANPAUSE, &ukphy_funcs, 1); + + if (bootverbose) { + reg = PHY_READ(sc, MII_BMCR); + device_printf(dev, "PHY control register flags: 0x%x\n", reg); + + reg = PHY_READ(sc, MII_BMSR); + device_printf(dev, "PHY status register: 0x%x\n", reg); + + if ((reg & BMSR_EXTSTAT) != 0) { + reg = PHY_READ(sc, MII_EXTSR); + device_printf(dev, "PHY extented status register: 0x%x\n", reg); + } + + } + mii_phy_setmedia(sc); return (0);