Skip to content

Commit

Permalink
i40evf: don't go further down
Browse files Browse the repository at this point in the history
If the device is down, there's no place to go but up, so don't try to go
down even more. This prevents a CPU soft lock in napi_disable().

Change-ID: I8b058b9ee974dfa01c212fae2597f4f54b333314
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
  • Loading branch information
Mitch Williams authored and Jeff Kirsher committed Jun 11, 2014
1 parent 04b73bd commit ddf0b3a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/ethernet/intel/i40evf/i40evf_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -968,6 +968,9 @@ void i40evf_down(struct i40evf_adapter *adapter)
struct net_device *netdev = adapter->netdev;
struct i40evf_mac_filter *f;

if (adapter->state == __I40EVF_DOWN)
return;

/* remove all MAC filters */
list_for_each_entry(f, &adapter->mac_filter_list, list) {
f->remove = true;
Expand Down Expand Up @@ -1785,12 +1788,11 @@ static int i40evf_close(struct net_device *netdev)
if (adapter->state <= __I40EVF_DOWN)
return 0;

/* signal that we are down to the interrupt handler */
adapter->state = __I40EVF_DOWN;

set_bit(__I40E_DOWN, &adapter->vsi.state);

i40evf_down(adapter);
adapter->state = __I40EVF_DOWN;
i40evf_free_traffic_irqs(adapter);

i40evf_free_all_tx_resources(adapter);
Expand Down

0 comments on commit ddf0b3a

Please sign in to comment.