mirror_ubuntu-kernels/drivers/net/ethernet
Íñigo Huguet e84a1e1e68 sfc: fix XDP queues mode with legacy IRQ
In systems without MSI-X capabilities, xdp_txq_queues_mode is calculated
in efx_allocate_msix_channels, but when enabling MSI-X fails, it was not
changed to a proper default value. This was leading to the driver
thinking that it has dedicated XDP queues, when it didn't.

Fix it by setting xdp_txq_queues_mode to the correct value if the driver
fallbacks to MSI or legacy IRQ mode. The correct value is
EFX_XDP_TX_QUEUES_BORROWED because there are no XDP dedicated queues.

The issue can be easily visible if the kernel is started with pci=nomsi,
then a call trace is shown. It is not shown only with sfc's modparam
interrupt_mode=2. Call trace example:
 WARNING: CPU: 2 PID: 663 at drivers/net/ethernet/sfc/efx_channels.c:828 efx_set_xdp_channels+0x124/0x260 [sfc]
 [...skip...]
 Call Trace:
  <TASK>
  efx_set_channels+0x5c/0xc0 [sfc]
  efx_probe_nic+0x9b/0x15a [sfc]
  efx_probe_all+0x10/0x1a2 [sfc]
  efx_pci_probe_main+0x12/0x156 [sfc]
  efx_pci_probe_post_io+0x18/0x103 [sfc]
  efx_pci_probe.cold+0x154/0x257 [sfc]
  local_pci_probe+0x42/0x80

Fixes: 6215b608a8 ("sfc: last resort fallback for lack of xdp tx queues")
Reported-by: Yanghang Liu <yanghliu@redhat.com>
Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
Acked-by: Martin Habets <habetsm.xilinx@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-06-15 11:43:31 +01:00
..
3com 3c589_cs: Fix an error handling path in tc589_probe() 2023-05-22 19:17:58 -07:00
8390 net: isa: include net/Space.h 2023-05-17 21:27:30 -07:00
actions
adaptec
adi net: Replace all spi->chip_select and spi->cs_gpiod references with function call 2023-03-11 12:34:02 +00:00
aeroflex
agere
alacritech
allwinner
alteon net: alteon: remove unused len variable 2023-04-02 13:43:43 +01:00
altera
amazon net: ena: removed unused tx_bytes variable 2023-03-29 21:39:35 -07:00
amd pds_core: Fix FW recovery detection 2023-06-06 21:10:01 -07:00
apm
apple
aquantia Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2023-05-05 13:35:45 -07:00
arc
asix net: Replace all spi->chip_select and spi->cs_gpiod references with function call 2023-03-11 12:34:02 +00:00
atheros net: atheros: atl1c: remove unused atl1c_irq_reset function 2023-03-21 21:18:54 -07:00
broadcom bnx2x: fix page fault following EEH recovery 2023-06-10 20:07:10 +01:00
brocade
cadence net: macb: Optimize reading HW timestamp 2023-04-13 22:16:09 -07:00
calxeda
cavium net: liquidio: Remove redundant pci_clear_master 2023-03-24 09:09:27 +00:00
chelsio Networking changes for 6.4. 2023-04-26 16:07:23 -07:00
cirrus net: isa: include net/Space.h 2023-05-17 21:27:30 -07:00
cisco
cortina
davicom spi: Updates for v6.4 2023-04-27 11:02:26 -07:00
dec
dlink
emulex net: vlan: introduce skb_vlan_eth_hdr() 2023-04-23 14:16:44 +01:00
engleder tsnep: Add XDP socket zero-copy TX support 2023-04-24 18:22:38 -07:00
ezchip
faraday
freescale net: enetc: correct the indexes of highest and 2nd highest TCs 2023-06-08 20:57:54 +01:00
fujitsu
fungible net/fungible: Remove redundant pci_clear_master 2023-03-24 09:09:27 +00:00
google gve: Remove the code of clearing PBA bit 2023-05-10 10:30:46 +01:00
hisilicon net: hns3: fix reset timeout when enable full VF 2023-05-13 17:12:23 +01:00
huawei
i825xx i825xx: sni_82596: use eth_hw_addr_set() 2023-03-16 17:35:21 -07:00
ibm mm, treewide: redefine MAX_ORDER sanely 2023-04-05 19:42:46 -07:00
intel ice: Fix ice module unload 2023-06-14 22:43:36 -07:00
litex
marvell octeontx2-af: fix lbk link credits on cn10k 2023-06-10 19:53:02 +01:00
mediatek net: ethernet: mtk_eth_soc: fix QoS on DSA MAC on non MTK_NETSYS_V2 SoCs 2023-05-24 08:04:41 +01:00
mellanox net/mlx5: Read embedded cpu after init bit cleared 2023-05-31 20:08:37 -07:00
micrel ksz884x: Remove unused functions 2023-04-12 09:38:19 +01:00
microchip lan966x: Fix unloading/loading of the driver 2023-05-23 13:01:06 +02:00
microsoft net: mana: Fix perf regression: remove rx_cqes, tx_cqes counters 2023-05-30 12:05:22 +02:00
moxa
mscc net: mscc: ocelot: fix stat counter register values 2023-05-10 12:11:18 +01:00
myricom
natsemi net/sonic: use dma_mapping_error() for error check 2023-03-21 21:29:34 -07:00
neterion
netronome nfp: fix NFP_NET_MAX_DSCP definition error 2023-05-12 08:55:47 +01:00
ni net: ni: drop of_match_ptr for ID table 2023-03-15 08:02:45 +00:00
nvidia forcedeth: Fix an error handling path in nv_probe() 2023-05-22 19:17:28 -07:00
nxp
oki-semi
packetengines
pasemi net: pasemi: Fix return type of pasemi_mac_start_tx() 2023-03-21 13:48:35 +01:00
pensando ionic: catch failure from devlink_alloc 2023-05-03 09:14:47 +01:00
qlogic qed/qede: Fix scheduling while atomic 2023-06-06 13:56:18 +02:00
qualcomm spi: Updates for v6.4 2023-04-27 11:02:26 -07:00
rdc
realtek r8169: Use a raw_spinlock_t for the register locks. 2023-05-23 20:38:12 -07:00
renesas net: renesas: rswitch: Fix timestamp feature after all descriptors are used 2023-06-09 10:41:09 +01:00
rocker
samsung net: samsung: sxgbe: drop of_match_ptr for ID table 2023-03-15 08:02:45 +00:00
seeq
sfc sfc: fix XDP queues mode with legacy IRQ 2023-06-15 11:43:31 +01:00
sgi
silan
sis
smsc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-03-30 14:43:03 -07:00
socionext drivers: net: turn on XDP features 2023-02-02 20:48:23 -08:00
stmicro net: stmmac: dwmac-qcom-ethqos: fix a regression on EMAC < 3 2023-06-05 11:38:49 +01:00
sun cassini: Fix a memory leak in the error handling path of cas_init_one() 2023-05-17 09:06:44 +01:00
sunplus ethernet: remove superfluous clearing of phydev 2023-03-22 20:47:27 -07:00
synopsys
tehuti
ti net: ethernet: ti: am65-cpsw: Call of_node_put() on error path 2023-06-13 20:47:03 -07:00
toshiba net/ps3_gelic_net: Use dma_mapping_error 2023-03-20 10:20:40 +00:00
tundra
vertexcom
via net: Use of_property_read_bool() for boolean properties 2023-03-16 17:41:28 +00:00
wangxun net: libwx: fix memory leak in wx_setup_rx_resources 2023-04-20 15:39:15 +02:00
wiznet
xilinx net: Use of_property_read_bool() for boolean properties 2023-03-16 17:41:28 +00:00
xircom xirc2ps_cs: Fix use after free bug in xirc2ps_detach 2023-03-19 10:42:02 +00:00
xscale
dnet.c
dnet.h
ec_bhf.c ethernet: ec_bhf: Remove redundant pci_clear_master 2023-03-24 09:09:28 +00:00
ethoc.c
fealnx.c eth: fealnx: bring back this old driver 2023-03-08 23:22:04 -08:00
jme.c
jme.h
Kconfig net: restore alpha order to Ethernet devices in config 2023-03-09 23:36:28 -08:00
korina.c
lantiq_etop.c
lantiq_xrx200.c
Makefile eth: fealnx: bring back this old driver 2023-03-08 23:22:04 -08:00