linux_dsm_epyc7002/drivers/net/ethernet/intel
Brett Creeley f844d5212c 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:

pci_disable_msix()
	free_msi_irqs()
		...
		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.

[1] Don't disable all active VF Tx/Rx queues prior to calling
pci_disable_sriov.

[2] Call ice_free_vfs() before disabling the service task.

[3] Disable VF resets when the ice driver is being unloaded by setting
the pf->state flag __ICE_VF_RESETS_DISABLED.

Changing [1] and [2] 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
disabling queues.

Due to [1] and [2] 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 [3].

Signed-off-by: Brett Creeley <brett.creeley@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2020-03-10 13:10:02 -07:00
..
e1000 e1000(e): use new helper tcp_v6_gso_csum_prep 2020-02-19 11:20:59 -08:00
e1000e e1000e: reject unsupported coalescing params 2020-03-05 12:12:35 -08:00
fm10k intel: Replace zero-length array with flexible-array member 2020-02-24 15:26:17 -08:00
i40e intel: Replace zero-length array with flexible-array member 2020-02-24 15:26:17 -08:00
iavf iavf: Enable support for up to 16 queues 2020-03-10 13:09:51 -07:00
ice ice: Fix removing driver while bare-metal VFs pass traffic 2020-03-10 13:10:02 -07:00
igb intel: Replace zero-length array with flexible-array member 2020-02-24 15:26:17 -08:00
igbvf netdev: pass the stuck queue to the timeout handler 2019-12-12 21:38:57 -08:00
igc intel: Replace zero-length array with flexible-array member 2020-02-24 15:26:17 -08:00
ixgb Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-12-22 15:15:05 -08:00
ixgbe ixgbe: Use pci_get_dsn() 2020-03-05 17:36:46 -08:00
ixgbevf Merge ra.kernel.org:/pub/scm/linux/kernel/git/netdev/net 2020-01-19 22:10:04 +01:00
e100.c netdev: pass the stuck queue to the timeout handler 2019-12-12 21:38:57 -08:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile igc: Add skeletal frame for Intel(R) 2.5G Ethernet Controller support 2018-10-17 12:14:54 -07:00