mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
ed277c50c0
commit
fd835129ab
|
@ -6431,7 +6431,10 @@ void i40e_print_link_message(struct i40e_vsi *vsi, bool isup)
|
||||||
char *req_fec = "";
|
char *req_fec = "";
|
||||||
char *an = "";
|
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))
|
if ((vsi->current_isup == isup) && (vsi->current_speed == new_speed))
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue