diff options
author | Robert Mustacchi <rm@joyent.com> | 2016-03-24 22:02:11 +0000 |
---|---|---|
committer | Robert Mustacchi <rm@joyent.com> | 2016-03-24 22:34:54 +0000 |
commit | 572f948835031e452ea91ae3b7d9914995153f08 (patch) | |
tree | 0dd93f99a73839b946ec610b556b262b77ed6f20 | |
parent | d25dfce94363dff4474ff7a733c846d713d0a769 (diff) | |
download | illumos-joyent-572f948835031e452ea91ae3b7d9914995153f08.tar.gz |
OS-5278 i40e keeps pestering MAC about its link state
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
-rw-r--r-- | usr/src/uts/common/io/i40e/i40e_main.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/usr/src/uts/common/io/i40e/i40e_main.c b/usr/src/uts/common/io/i40e/i40e_main.c index f475c91891..e8bac07eef 100644 --- a/usr/src/uts/common/io/i40e/i40e_main.c +++ b/usr/src/uts/common/io/i40e/i40e_main.c @@ -529,11 +529,12 @@ void i40e_link_check(i40e_t *i40e) { i40e_hw_t *hw = &i40e->i40e_hw_space; - boolean_t ls; + boolean_t ls, changed; int ret; ASSERT(MUTEX_HELD(&i40e->i40e_general_lock)); + changed = B_FALSE; hw->phy.get_link_info = B_TRUE; if ((ret = i40e_get_link_status(hw, &ls)) != I40E_SUCCESS) { i40e->i40e_s_link_status_errs++; @@ -579,15 +580,20 @@ i40e_link_check(i40e_t *i40e) * operation, hence why we don't ask the hardware about our * current speed. */ + if (i40e->i40e_link_state == LINK_STATE_DOWN) + changed = B_TRUE; i40e->i40e_link_duplex = LINK_DUPLEX_FULL; i40e->i40e_link_state = LINK_STATE_UP; } else { + if (i40e->i40e_link_state == LINK_STATE_UP) + changed = B_TRUE; i40e->i40e_link_speed = 0; i40e->i40e_link_duplex = 0; i40e->i40e_link_state = LINK_STATE_DOWN; } - mac_link_update(i40e->i40e_mac_hdl, i40e->i40e_link_state); + if (changed == B_TRUE) + mac_link_update(i40e->i40e_mac_hdl, i40e->i40e_link_state); } static void |