android_kernel_motorola_sm6375/drivers/net
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Robert Hancock ba0d7beec2 net: macb: Fix lost RX packet wakeup race in NAPI receive
commit 0bf476fc3624e3a72af4ba7340d430a91c18cd67 upstream.

There is an oddity in the way the RSR register flags propagate to the
ISR register (and the actual interrupt output) on this hardware: it
appears that RSR register bits only result in ISR being asserted if the
interrupt was actually enabled at the time, so enabling interrupts with
RSR bits already set doesn't trigger an interrupt to be raised. There
was already a partial fix for this race in the macb_poll function where
it checked for RSR bits being set and re-triggered NAPI receive.
However, there was a still a race window between checking RSR and
actually enabling interrupts, where a lost wakeup could happen. It's
necessary to check again after enabling interrupts to see if RSR was set
just prior to the interrupt being enabled, and re-trigger receive in that
case.

This issue was noticed in a point-to-point UDP request-response protocol
which periodically saw timeouts or abnormally high response times due to
received packets not being processed in a timely fashion. In many
applications, more packets arriving, including TCP retransmissions, would
cause the original packet to be processed, thus masking the issue.

Fixes: 02f7a34f34 ("net: macb: Re-enable RX interrupt only when RX is done")
Cc: [email protected]
Co-developed-by: Scott McNutt <[email protected]>
Signed-off-by: Scott McNutt <[email protected]>
Signed-off-by: Robert Hancock <[email protected]>
Tested-by: Claudiu Beznea <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-03-16 13:21:47 +01:00
..
appletalk
arcnet
bonding
caif
can can: gs_usb: change active_channels's type from atomic_t to u8 2022-03-08 19:07:49 +01:00
dsa
ethernet net: macb: Fix lost RX packet wakeup race in NAPI receive 2022-03-16 13:21:47 +01:00
fddi
fjes
hamradio hamradio: fix macro redefine warning 2022-03-08 19:07:51 +01:00
hippi
hyperv
ieee802154
ipvlan
netdevsim
phy net: phy: DP83822: clear MISR2 register to disable interrupts 2022-03-16 13:21:46 +01:00
plip
ppp
slip
team
usb
vmxnet3
wan
wimax
wireless
xen-netback Revert "xen-netback: Check for hotplug-status existence before watching" 2022-03-16 13:21:47 +01: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
veth.c
virtio_net.c
vrf.c
vsockmon.c
vxlan.c
xen-netfront.c xen/netfront: react properly to failing gnttab_end_foreign_access_ref() 2022-03-11 11:22:39 +01:00