linux/drivers/net/ethernet
Vladimir Oltean 3222b5b613 net: enetc: initialize RFS/RSS memories for unused ports too
Michael reports that since linux-next-20210211, the AER messages for ECC
errors have started reappearing, and this time they can be reliably
reproduced with the first ping on one of his LS1028A boards.

$ ping 1[   33.258069] pcieport 0000:00:1f.0: AER: Multiple Corrected error received: 0000:00:00.0
72.16.0.1
PING [   33.267050] pcieport 0000:00:1f.0: AER: can't find device of ID0000
172.16.0.1 (172.16.0.1): 56 data bytes
64 bytes from 172.16.0.1: seq=0 ttl=64 time=17.124 ms
64 bytes from 172.16.0.1: seq=1 ttl=64 time=0.273 ms

$ devmem 0x1f8010e10 32
0xC0000006

It isn't clear why this is necessary, but it seems that for the errors
to go away, we must clear the entire RFS and RSS memory, not just for
the ports in use.

Sadly the code is structured in such a way that we can't have unified
logic for the used and unused ports. For the minimal initialization of
an unused port, we need just to enable and ioremap the PF memory space,
and a control buffer descriptor ring. Unused ports must then free the
CBDR because the driver will exit, but used ports can not pick up from
where that code path left, since the CBDR API does not reinitialize a
ring when setting it up, so its producer and consumer indices are out of
sync between the software and hardware state. So a separate
enetc_init_unused_port function was created, and it gets called right
after the PF memory space is enabled.

Fixes: 07bf34a50e ("net: enetc: initialize the RFS and RSS memories")
Reported-by: Michael Walle <michael@walle.cc>
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Michael Walle <michael@walle.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-03-01 13:34:47 -08:00
..
3com isa: Make the remove callback for isa drivers return void 2021-01-26 07:42:27 +01:00
8390
adaptec
aeroflex
agere ethernet: select CONFIG_CRC32 as needed 2020-12-04 14:42:21 -08:00
alacritech
allwinner net: allwinner: Fix some resources leak in the error handling path of the probe and in the remove function 2020-12-16 11:37:31 -08:00
alteon
altera
amazon Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-02-10 13:30:12 -08:00
amd Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-02-16 17:51:13 -08:00
apm
apple
aquantia net: ethernet: aquantia: Handle error cleanup of start on open 2021-02-11 14:38:06 -08:00
arc
atheros net: ag71xx: remove unnecessary MTU reservation 2021-02-22 17:45:25 -08:00
broadcom net: broadcom: bcm4908_enet: enable RX after processing packets 2021-02-28 11:51:31 -08:00
brocade net: bna: remove trailing semicolon in macro definition 2020-12-04 17:41:49 -08:00
cadence net: macb: ignore tx_clk if MII is used 2021-01-21 19:50:47 -08:00
calxeda
cavium net/ethernet: convert to use module_platform_driver in octeon_mgmt.c 2021-01-29 19:02:43 -08:00
chelsio Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2021-02-21 17:23:56 -08:00
cirrus
cisco net: remove ndo_udp_tunnel_* callbacks 2021-01-07 12:53:29 -08:00
cortina
davicom
dec
dlink
emulex net: remove ndo_udp_tunnel_* callbacks 2021-01-07 12:53:29 -08:00
ezchip
faraday Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-12-11 22:29:38 -08:00
freescale net: enetc: initialize RFS/RSS memories for unused ports too 2021-03-01 13:34:47 -08:00
fujitsu
google gve: Add support for raw addressing in the tx path 2020-12-08 16:06:28 -08:00
hisilicon net: hns3: fix bug when calculating the TCAM table info 2021-02-28 12:04:00 -08:00
huawei net: hinic: simplify the return hinic_configure_max_qnum() 2020-12-09 17:05:37 -08:00
i825xx drivers: net: ethernet: i825xx: Fix couple of spellings in the file ether1.c 2021-02-04 19:07:55 -08:00
ibm Networking fixes for 5.12-rc1. Rather small batch this time. 2021-02-25 12:06:25 -08:00
intel Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue 2021-02-23 16:45:30 -08:00
marvell Marvell Sky2 Ethernet adapter: fix warning messages. 2021-02-23 12:17:21 -08:00
mediatek net: ethernet: mediatek: support setting MTU 2021-01-25 18:23:14 -08:00
mellanox mlxsw: spectrum_router: Ignore routes using a deleted nexthop object 2021-02-26 15:47:53 -08:00
micrel net: ks8851: remove definition of DEBUG 2021-01-15 17:53:29 -08:00
microchip lan743x: sync only the received area of an rx ring buffer 2021-02-16 15:15:21 -08:00
moxa
mscc net: mscc: ocelot: select NET_DEVLINK 2021-02-26 15:29:53 -08:00
myricom
natsemi net/sonic: Fix some resource leaks in error handling paths 2021-01-05 15:59:20 -08:00
neterion net: vxget: clean up sparse warnings 2020-12-14 19:18:11 -08:00
netronome bpf: Rename BPF_XADD and prepare to encode other atomics in .imm 2021-01-14 18:34:29 -08:00
ni net: nixge: fix spelling mistake in Kconfig: "Instuments" -> "Instruments" 2020-12-17 10:54:31 -08:00
nvidia
nxp ethernet: select CONFIG_CRC32 as needed 2020-12-04 14:42:21 -08:00
oki-semi net: pch_gbe: Use 'dma_free_coherent()' to undo 'dma_alloc_coherent()' 2020-11-23 17:01:48 -08:00
packetengines
pasemi net: pasemi: fix error return code in pasemi_mac_open() 2020-12-02 18:03:58 -08:00
pensando ionic: Remove unused function pointer typedef ionic_reset_cb 2021-02-16 13:43:58 -08:00
qlogic qede: preserve per queue stats across up/down of interface 2021-02-11 14:25:06 -08:00
qualcomm net: qualcomm: rmnet: Fix rx_handler for non-linear skbs 2021-02-06 11:28:45 -08:00
rdc
realtek r8169: fix jumbo packet handling on RTL8168e 2021-02-25 09:55:16 -08:00
renesas sh_eth: fix TRSCER mask for R7S9210 2021-03-01 13:22:34 -08:00
rocker net: switchdev: pass flags and mask to both {PRE_,}BRIDGE_FLAGS attributes 2021-02-12 17:08:04 -08:00
samsung net: phy: rename PHY_IGNORE_INTERRUPT to PHY_MAC_INTERRUPT 2021-02-15 15:20:49 -08:00
seeq
sfc sfc: reduce the number of requested xdp ev queues 2021-01-22 19:16:45 -08:00
sgi
silan
sis
smsc net: smsc911x: Make Runtime PM handling more fine-grained 2021-01-19 17:46:39 -08:00
socionext net, xdp: Introduce xdp_prepare_buff utility routine 2021-01-08 13:39:24 -08:00
stmicro net: stmmac: re-init rx buffers when mac resume back 2021-02-26 15:17:12 -08:00
sun
synopsys net: dwc-xlgmac: Fix spelling mistake in function name 2021-02-06 11:37:01 -08:00
tehuti
ti Devicetree updates for v5.12: 2021-02-22 10:05:12 -08:00
toshiba net: ethernet: toshiba: spider_net: Document a whole bunch of function parameters 2021-01-16 18:13:28 -08:00
tundra
via
wiznet
xilinx Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-02-16 17:51:13 -08:00
xircom
xscale net: ixp4xx_eth: Use DEFINE_SPINLOCK() for spinlock 2021-01-05 15:43:41 -08:00
dnet.c
dnet.h
ec_bhf.c
ethoc.c net: ethernet: Fix memleak in ethoc_probe 2020-12-23 12:28:53 -08:00
fealnx.c
jme.c
jme.h
Kconfig net: remove aurora nb8800 driver 2021-01-21 19:48:38 -08:00
korina.c net: korina: fix return value 2020-12-16 15:01:07 -08:00
lantiq_etop.c
lantiq_xrx200.c
Makefile net: remove aurora nb8800 driver 2021-01-21 19:48:38 -08:00