ice: Fix removing driver while bare-metal VFs pass traffic
Currently, if there are bare-metal VFs passing traffic and the ice
driver is removed, there is a possibility of VFs triggering a Tx timeout
right before iavf_remove(). This is causing iavf_close() to not be
called because there is a check in the beginning of iavf_remove() that
bails out early if (adapter->state < IAVF_DOWN_PENDING). This makes it
so some resources do not get cleaned up. Specifically, free_irq()
is never called for data interrupts, which results in the following line
of code to trigger:
BUG_ON(irq_has_action(entry->irq + i));
To prevent the Tx timeout from occurring on the VF during driver unload
for ice and the iavf there are a few changes that are needed.
 Don't disable all active VF Tx/Rx queues prior to calling
 Call ice_free_vfs() before disabling the service task.
 Disable VF resets when the ice driver is being unloaded by setting
the pf->state flag __ICE_VF_RESETS_DISABLED.
Changing  and  allow each VF driver's remove flow to successfully
send VIRTCHNL requests, which includes queue disable. This prevents
unexpected Tx timeouts because the PF driver is no longer forcefully
Due to  and  there is a possibility that the PF driver will get a
VFLR or reset request over VIRTCHNL from a VF during PF driver unload.
Prevent that by doing .
Signed-off-by: Brett Creeley <email@example.com>
Tested-by: Andrew Bowers <firstname.lastname@example.org>
Signed-off-by: Jeff Kirsher <email@example.com>
3 files changed