mirror of
https://github.com/torvalds/linux.git
synced 2024-12-05 02:23:16 +00:00
i40e: Fix link down message when interface is brought up
i40e_print_link_message() is intended to compare new link state with current link state and print log message only if the new state is different from current state. However in current driver the new state does not get updated when link is going down because of the if condition. When an interface is brought down, vsi->state is set to I40E_VSI_DOWN in i40e_vsi_close() and later i40e_print_link_message() does not get invoked in i40e_link_event due to if condition. Hence link down message doesn't appear when link is going down. The down state is seen later during i40e_open() and old state gets printed. The actual link state doesn't get updated in i40e_close() or i40e_open() but when i40e_handle_link_event is called inside i40e_clean_adminq_subtask. This change allows i40e_print_link_message() to be called when interface is going down and keeps the state information updated. Signed-off-by: Sudheer Mogilappagari <sudheer.mogilappagari@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
16badf758b
commit
9a03449d3e
@ -6420,8 +6420,7 @@ static void i40e_link_event(struct i40e_pf *pf)
|
||||
new_link == netif_carrier_ok(vsi->netdev)))
|
||||
return;
|
||||
|
||||
if (!test_bit(__I40E_VSI_DOWN, vsi->state))
|
||||
i40e_print_link_message(vsi, new_link);
|
||||
i40e_print_link_message(vsi, new_link);
|
||||
|
||||
/* Notify the base of the switch tree connected to
|
||||
* the link. Floating VEBs are not notified.
|
||||
|
Loading…
Reference in New Issue
Block a user