]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
net: usb: lan78xx: fix silent drop of packets with checksum errors
authorOleksij Rempel <o.rempel@pengutronix.de>
Thu, 5 Mar 2026 14:34:26 +0000 (15:34 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 10 Mar 2026 02:48:33 +0000 (19:48 -0700)
commite4f774a0cc955ce762aec91c66915a6e15087ab7
treee56c3b1243f6914a32027661302a57719b55dfcd
parent7a85d370bbd0d55791ec57ea8ba13032410e8b9d
net: usb: lan78xx: fix silent drop of packets with checksum errors

Do not drop packets with checksum errors at the USB driver level;
pass them to the network stack.

Previously, the driver dropped all packets where the 'Receive Error
Detected' (RED) bit was set, regardless of the specific error type. This
caused packets with only IP or TCP/UDP checksum errors to be dropped
before reaching the kernel, preventing the network stack from accounting
for them or performing software fallback.

Add a mask for hard hardware errors to safely drop genuinely corrupt
frames, while allowing checksum-errored frames to pass with their
ip_summed field explicitly set to CHECKSUM_NONE.

Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver")
Cc: stable@vger.kernel.org
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://patch.msgid.link/20260305143429.530909-2-o.rempel@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/usb/lan78xx.c
drivers/net/usb/lan78xx.h