android_kernel_motorola_sm6375/drivers/net
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Florian Fainelli c675256a7f net: systemport: Add global locking for descriptor lifecycle
[ Upstream commit 8b8e6e782456f1ce02a7ae914bbd5b1053f0b034 ]

The descriptor list is a shared resource across all of the transmit queues, and
the locking mechanism used today only protects concurrency across a given
transmit queue between the transmit and reclaiming. This creates an opportunity
for the SYSTEMPORT hardware to work on corrupted descriptors if we have
multiple producers at once which is the case when using multiple transmit
queues.

This was particularly noticeable when using multiple flows/transmit queues and
it showed up in interesting ways in that UDP packets would get a correct UDP
header checksum being calculated over an incorrect packet length. Similarly TCP
packets would get an equally correct checksum computed by the hardware over an
incorrect packet length.

The SYSTEMPORT hardware maintains an internal descriptor list that it re-arranges
when the driver produces a new descriptor anytime it writes to the
WRITE_PORT_{HI,LO} registers, there is however some delay in the hardware to
re-organize its descriptors and it is possible that concurrent TX queues
eventually break this internal allocation scheme to the point where the
length/status part of the descriptor gets used for an incorrect data buffer.

The fix is to impose a global serialization for all TX queues in the short
section where we are writing to the WRITE_PORT_{HI,LO} registers which solves
the corruption even with multiple concurrent TX queues being used.

Fixes: 80105befdb ("net: systemport: add Broadcom SYSTEMPORT Ethernet MAC driver")
Signed-off-by: Florian Fainelli <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2021-12-22 09:29:38 +01:00
..
appletalk
arcnet
bonding bonding: make tx_rebalance_counter an atomic 2021-12-14 14:49:00 +01:00
caif
can can: m_can: Disable and ignore ELO interrupt 2021-12-14 14:49:02 +01:00
dsa net: dsa: rtl8366rb: Fix off-by-one bug 2021-11-17 09:48:34 +01:00
ethernet net: systemport: Add global locking for descriptor lifecycle 2021-12-22 09:29:38 +01:00
fddi
fjes
hamradio net: 6pack: Fix tx timeout and slot time 2021-09-30 10:09:26 +02:00
hippi
hyperv
ieee802154
ipvlan
netdevsim netdevsim: Zero-initialize memory for new map's value in function nsim_bpf_map_alloc 2021-12-22 09:29:38 +01:00
phy mdio: aspeed: Fix "Link is Down" issue 2021-12-01 09:23:29 +01:00
plip
ppp
slip
team
usb net: cdc_ncm: Allow for dwNtbOutMaxSize to be unset or zero 2021-12-14 14:49:03 +01:00
vmxnet3 vmxnet3: do not stop tx queues after netif_device_detach() 2021-11-17 09:48:21 +01:00
wan
wimax
wireless iwlwifi: mvm: retry init flow if failed 2021-12-08 09:01:14 +01:00
xen-netback xen-netback: correct success/error reporting for the SKB-with-fraglist case 2021-10-09 14:39:49 +02:00
dummy.c
eql.c
geneve.c
gtp.c
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macsec.c
macvlan.c
macvtap.c
Makefile
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: fix bonding active backup with arp monitoring 2021-11-26 10:47:21 +01:00
veth.c
virtio_net.c
vrf.c vrf: don't run conntrack on vrf with !dflt qdisc 2021-12-14 14:48:59 +01:00
vsockmon.c
vxlan.c
xen-netfront.c xen/netfront: don't trust the backend response data blindly 2021-12-01 09:23:35 +01:00