summaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
authorRobert Hancock <robert.hancock@calian.com>2022-03-03 12:10:27 -0600
committerDavid S. Miller <davem@davemloft.net>2022-03-04 12:05:54 +0000
commit0bf476fc3624e3a72af4ba7340d430a91c18cd67 (patch)
tree5e39ef1cc1a7956b073020b1b727ce0e6321e0eb /net/tipc
parent9f3956d6595abcd1295f13d96132ff7f28e8ed64 (diff)
downloadlinux-stable-0bf476fc3624e3a72af4ba7340d430a91c18cd67.tar.gz
linux-stable-0bf476fc3624e3a72af4ba7340d430a91c18cd67.tar.bz2
linux-stable-0bf476fc3624e3a72af4ba7340d430a91c18cd67.zip
net: macb: Fix lost RX packet wakeup race in NAPI receive
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: 02f7a34f34e3 ("net: macb: Re-enable RX interrupt only when RX is done") Cc: stable@vger.kernel.org Co-developed-by: Scott McNutt <scott.mcnutt@siriusxm.com> Signed-off-by: Scott McNutt <scott.mcnutt@siriusxm.com> Signed-off-by: Robert Hancock <robert.hancock@calian.com> Tested-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc')
0 files changed, 0 insertions, 0 deletions