diff options
author | ps <ps@FreeBSD.org> | 2003-05-04 02:03:20 +0000 |
---|---|---|
committer | ps <ps@FreeBSD.org> | 2003-05-04 02:03:20 +0000 |
commit | 96f7782627c5d42aae6a4dca6c8ec70bf8fd3602 (patch) | |
tree | 77b58c4e59ac0346918d95695cd0f96241e089b2 /sys/dev/mii | |
parent | c0a8b198d1c42a0d42b108279497d834405ce3c4 (diff) | |
download | FreeBSD-src-96f7782627c5d42aae6a4dca6c8ec70bf8fd3602.zip FreeBSD-src-96f7782627c5d42aae6a4dca6c8ec70bf8fd3602.tar.gz |
Something I missed in my tree.
If the media changes, poke the DSP on the 5401/5411 Broadcom PHY's.
Obtained from: NetBSD
Diffstat (limited to 'sys/dev/mii')
-rw-r--r-- | sys/dev/mii/brgphy.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/sys/dev/mii/brgphy.c b/sys/dev/mii/brgphy.c index 7f42688..614d0af 100644 --- a/sys/dev/mii/brgphy.c +++ b/sys/dev/mii/brgphy.c @@ -341,8 +341,24 @@ setit: /* Update the media status. */ brgphy_status(sc); - /* Callback if something changed. */ - mii_phy_update(sc, cmd); + /* + * Callback if something changed. Note that we need to poke + * the DSP on the Broadcom PHYs if the media changes. + * + */ + if (sc->mii_media_active != mii->mii_media_active || + sc->mii_media_status != mii->mii_media_status || + cmd == MII_MEDIACHG) { + mii_phy_update(sc, cmd); + switch (brgphy_mii_model) { + case MII_MODEL_xxBROADCOM_BCM5401: + bcm5401_load_dspcode(sc); + break; + case MII_MODEL_xxBROADCOM_BCM5411: + bcm5411_load_dspcode(sc); + break; + } + } return (0); } |