Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/mii/rdcphy.c
Show First 20 Lines • Show All 179 Lines • ▼ Show 20 Lines | rdcphy_service(struct mii_softc *sc, struct mii_data *mii, int cmd) | ||||
mii_phy_update(sc, cmd); | mii_phy_update(sc, cmd); | ||||
return (0); | return (0); | ||||
} | } | ||||
static void | static void | ||||
rdcphy_status(struct mii_softc *sc) | rdcphy_status(struct mii_softc *sc) | ||||
{ | { | ||||
struct mii_data *mii; | struct mii_data *mii; | ||||
struct ifmedia_entry *ife; | |||||
int bmsr, bmcr, physts; | int bmsr, bmcr, physts; | ||||
mii = sc->mii_pdata; | mii = sc->mii_pdata; | ||||
ife = mii->mii_media.ifm_cur; | |||||
mii->mii_media_status = IFM_AVALID; | mii->mii_media_status = IFM_AVALID; | ||||
mii->mii_media_active = IFM_ETHER; | mii->mii_media_active = IFM_ETHER; | ||||
bmsr = PHY_READ(sc, MII_BMSR) | PHY_READ(sc, MII_BMSR); | bmsr = PHY_READ(sc, MII_BMSR) | PHY_READ(sc, MII_BMSR); | ||||
physts = PHY_READ(sc, MII_RDCPHY_STATUS); | physts = PHY_READ(sc, MII_RDCPHY_STATUS); | ||||
if ((physts & STATUS_LINK_UP) != 0) | if ((physts & STATUS_LINK_UP) != 0) | ||||
Show All 36 Lines |