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:
Sergey Nemov 2018-08-28 10:16:06 -07:00 коммит произвёл Jeff Kirsher
Родитель ed277c50c0
Коммит fd835129ab
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -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;