From 2d6653314a5caa876eab51986371adce6e80d030 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Mon, 4 Jan 2010 22:05:04 -0800 Subject: 6913795 mii keeps incorrect link state when interface is unplumbed --- usr/src/uts/common/io/mii/mii.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'usr/src') diff --git a/usr/src/uts/common/io/mii/mii.c b/usr/src/uts/common/io/mii/mii.c index 4c5caf6443..bbb02e269f 100644 --- a/usr/src/uts/common/io/mii/mii.c +++ b/usr/src/uts/common/io/mii/mii.c @@ -401,8 +401,19 @@ mii_stop(mii_handle_t mh) { mutex_enter(&mh->m_lock); mh->m_started = B_FALSE; + /* + * Reset link state to unknown defaults, since we're not + * monitoring it anymore. We'll reprobe all link state later. + */ + mh->m_link = LINK_STATE_UNKNOWN; + mh->m_phy = &mh->m_bogus_phy; cv_broadcast(&mh->m_cv); mutex_exit(&mh->m_lock); + /* + * Notify the MAC driver. This will allow it to call back + * into the MAC framework to clear any previous link state. + */ + _mii_notify(mh); } void -- cgit v1.2.3