aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSergey Nemov <sergey.nemov@intel.com>2018-08-28 10:16:06 -0700
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2018-09-25 13:06:50 -0700
commitfd835129ab21e6075c456908e3d29b11c8b20850 (patch)
tree1858c9ead992b3ab0e1ae9e3cecf702f06cf9196 /drivers
parenti40e: add a helper function to validate a VF based on the vf id (diff)
downloadlinux-dev-fd835129ab21e6075c456908e3d29b11c8b20850.tar.xz
linux-dev-fd835129ab21e6075c456908e3d29b11c8b20850.zip
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')
-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;