Lines 62-73
ukphy_status(struct mii_softc *phy)
Link Here
|
62 |
struct ifmedia_entry *ife = mii->mii_media.ifm_cur; |
62 |
struct ifmedia_entry *ife = mii->mii_media.ifm_cur; |
63 |
int bmsr, bmcr, anlpar, gtcr, gtsr; |
63 |
int bmsr, bmcr, anlpar, gtcr, gtsr; |
64 |
|
64 |
|
65 |
mii->mii_media_status = IFM_AVALID; |
|
|
66 |
mii->mii_media_active = IFM_ETHER; |
67 |
|
68 |
bmsr = PHY_READ(phy, MII_BMSR) | PHY_READ(phy, MII_BMSR); |
65 |
bmsr = PHY_READ(phy, MII_BMSR) | PHY_READ(phy, MII_BMSR); |
69 |
if (bmsr & BMSR_LINK) |
66 |
if (bmsr & BMSR_LINK) |
70 |
mii->mii_media_status |= IFM_ACTIVE; |
67 |
mii->mii_media_status = IF_AVALID | IFM_ACTIVE; |
|
|
68 |
else |
69 |
mii->mii_media_status = IF_AVALID; |
70 |
mii->mii_media_active = IFM_ETHER; |
71 |
|
71 |
|
72 |
bmcr = PHY_READ(phy, MII_BMCR); |
72 |
bmcr = PHY_READ(phy, MII_BMCR); |
73 |
if (bmcr & BMCR_ISO) { |
73 |
if (bmcr & BMCR_ISO) { |