提交 3c8e0b98 编写于 作者: M Mitch Williams 提交者: Jeff Kirsher

i40vf: don't stop me now

If a reset occurs when the netdev is closed, the reset task will hang in
napi_disable, causing deadlocks and general grumpiness.

Check to make sure the device is actually running before stopping
everything. This allows the reset task to complete and have a real good
time.

Change-ID: Iaaea84acbcb9b3810c216b14c3326e4287b75b58
Signed-off-by: NMitch Williams <mitch.a.williams@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
上级 1efc80ee
...@@ -1578,13 +1578,14 @@ static void i40evf_reset_task(struct work_struct *work) ...@@ -1578,13 +1578,14 @@ static void i40evf_reset_task(struct work_struct *work)
adapter->flags &= ~I40EVF_FLAG_RESET_PENDING; adapter->flags &= ~I40EVF_FLAG_RESET_PENDING;
i40evf_irq_disable(adapter); i40evf_irq_disable(adapter);
i40evf_napi_disable_all(adapter);
netif_tx_disable(netdev);
netif_tx_stop_all_queues(netdev); if (netif_running(adapter->netdev)) {
i40evf_napi_disable_all(adapter);
netif_tx_disable(netdev);
netif_tx_stop_all_queues(netdev);
netif_carrier_off(netdev);
}
netif_carrier_off(netdev);
adapter->state = __I40EVF_RESETTING; adapter->state = __I40EVF_RESETTING;
/* kill and reinit the admin queue */ /* kill and reinit the admin queue */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册