summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/i40e
diff options
context:
space:
mode:
authorSergey Nemov <sergey.nemov@intel.com>2018-08-28 20:16:06 +0300
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2018-09-25 23:06:50 +0300
commitfd835129ab21e6075c456908e3d29b11c8b20850 (patch)
tree1858c9ead992b3ab0e1ae9e3cecf702f06cf9196 /drivers/net/ethernet/intel/i40e
parented277c50c0752e11631bc79363385db0e1bb010a (diff)
downloadlinux-fd835129ab21e6075c456908e3d29b11c8b20850.tar.xz
i40e: fix double 'NIC Link is Down' messages
When isup is false meaning that interface is going to shut down set new speed to 0 to avoid double 'NIC Link is Down' messages. Signed-off-by: Sergey Nemov <sergey.nemov@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/i40e')
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 102219cea67f..330bafe6a689 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -6431,7 +6431,10 @@ void i40e_print_link_message(struct i40e_vsi *vsi, bool isup)
char *req_fec = "";
char *an = "";
- new_speed = pf->hw.phy.link_info.link_speed;
+ if (isup)
+ new_speed = pf->hw.phy.link_info.link_speed;
+ else
+ new_speed = I40E_LINK_SPEED_UNKNOWN;
if ((vsi->current_isup == isup) && (vsi->current_speed == new_speed))
return;