2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-19 11:04:00 +08:00
linux-next/drivers/net
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
..
appletalk
arcnet
bonding net/bond: Delete driver and module versions 2020-02-24 11:23:36 -08:00
caif
can
dsa net: dsa: mt7530: add support for port mirroring 2020-03-09 19:25:04 -07:00
ethernet ice: Fix removing driver while bare-metal VFs pass traffic 2020-03-10 13:10:02 -07:00
fddi net: skfp: use new constant PCI_STATUS_ERROR_BITS 2020-03-04 14:21:00 -08:00
fjes
hamradio
hippi
hyperv net/ethtool: Introduce link_ksettings API for virtual network devices 2020-02-29 21:48:55 -08:00
ieee802154
ipa soc: qcom: ipa: support build of IPA code 2020-03-08 22:07:10 -07:00
ipvlan
netdevsim netdevsim: add ACL trap reporting cookie as a metadata 2020-02-25 11:05:55 -08:00
phy net: mdio: add ipq8064 mdio driver 2020-03-06 22:07:05 -08:00
plip
ppp
slip slip: not call free_netdev before rtnl_unlock in slip_open 2020-02-26 20:37:06 -08:00
team
usb r8152: reject unsupported coalescing params 2020-03-06 22:45:55 -08:00
vmxnet3 vmxnet3: let core reject the unsupported coalescing parameters 2020-03-06 22:45:55 -08:00
wan WAN: Replace zero-length array with flexible-array member 2020-02-27 12:06:55 -08:00
wimax
wireguard wireguard: socket: remove extra call to synchronize_net 2020-02-16 19:21:56 -08:00
wireless wil6210: reject unsupported coalescing params 2020-03-06 22:45:55 -08:00
xen-netback
bareudp.c bareudp: remove unnecessary udp_encap_enable() in bareudp_socket_create() 2020-03-08 21:22:29 -07:00
dummy.c net/dummy: Ditch driver and module versions 2020-02-24 11:23:36 -08:00
eql.c
geneve.c
gtp.c gtp: use icmp_ndo_send helper 2020-02-13 14:19:00 -08:00
ifb.c
Kconfig soc: qcom: ipa: support build of IPA code 2020-03-08 22:07:10 -07:00
LICENSE.SRC
loopback.c
macsec.c
macvlan.c
macvtap.c
Makefile soc: qcom: ipa: support build of IPA code 2020-03-08 22:07:10 -07:00
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c tun: reject unsupported coalescing params 2020-03-06 22:45:55 -08:00
veth.c
virtio_net.c virtio_net: reject unsupported coalescing params 2020-03-05 12:12:35 -08:00
vrf.c
vsockmon.c
vxlan.c
xen-netfront.c