summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorGarrett D'Amore <gdamore@opensolaris.org>2010-01-04 22:05:04 -0800
committerGarrett D'Amore <gdamore@opensolaris.org>2010-01-04 22:05:04 -0800
commit2d6653314a5caa876eab51986371adce6e80d030 (patch)
tree6ddc519b67eb643fbe417ec6be3181032111b6f2 /usr/src
parent42cac157f878fbb7ae190eb0339c6932f3192b87 (diff)
downloadillumos-joyent-2d6653314a5caa876eab51986371adce6e80d030.tar.gz
6913795 mii keeps incorrect link state when interface is unplumbed
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/uts/common/io/mii/mii.c11
1 files changed, 11 insertions, 0 deletions
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