--- /sys/dev/mii/brgphy.c.orig 2008-10-06 14:45:19.000000000 +0200 +++ /sys/dev/mii/brgphy.c 2008-10-06 16:54:33.000000000 +0200 @@ -489,6 +489,11 @@ struct mii_data *mii = sc->mii_pdata; int aux, bmcr, bmsr, anar, anlpar, xstat, val; + struct bce_softc *bce_sc = NULL; + + if (strcmp(mii->mii_ifp->if_dname, "bce") == 0) { + bce_sc = mii->mii_ifp->if_softc; + } mii->mii_media_status = IFM_AVALID; mii->mii_media_active = IFM_ETHER; @@ -509,7 +514,13 @@ (bmsr & BRGPHY_BMSR_ACOMP) == 0) { /* Erg, still trying, I guess... */ mii->mii_media_active |= IFM_NONE; - goto brgphy_status_exit; + + if (!bce_sc) + goto brgphy_status_exit; /* not a bce-card */ + + if (pci_get_vendor(bce_sc->bce_dev) == BCOM_VENDORID && pci_get_device(bce_sc->bce_dev) != BRCM_DEVICEID_BCM5708S) + goto brgphy_status_exit; /* skipping return here, makes BCM5708S happy */ + } /* Autoneg is enabled and complete, link should be up. */