Skip to content

Commit a5e5fbd

Browse files
6by9popcornmix
authored andcommitted
net: lan78xx: Request s/w csum check on VLAN tagged packets.
There appears to be some issue in the LAN78xx where the checksum computed on a VLAN tagged packet is incorrect, or at least not in the form that the kernel is after. This is most easily shown by pinging a device via a VLAN tagged interface and it will dump out the error message and stack trace from netdev_rx_csum_fault. It has also been seen with standard TCP and UDP packets. Until this is fully understood, request that the network stack computes the checksum on packets signalled as having a VLAN tag applied. See #2458 Signed-off-by: Dave Stevenson <[email protected]>
1 parent b1356ab commit a5e5fbd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/net/usb/lan78xx.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2983,8 +2983,12 @@ static void lan78xx_rx_csum_offload(struct lan78xx_net *dev,
29832983
struct sk_buff *skb,
29842984
u32 rx_cmd_a, u32 rx_cmd_b)
29852985
{
2986+
/* Checksum offload appears to be flawed if used with VLANs.
2987+
* Elect for sw checksum check instead.
2988+
*/
29862989
if (!(dev->net->features & NETIF_F_RXCSUM) ||
2987-
unlikely(rx_cmd_a & RX_CMD_A_ICSM_)) {
2990+
unlikely(rx_cmd_a & RX_CMD_A_ICSM_) ||
2991+
(rx_cmd_a & RX_CMD_A_FVTG_)) {
29882992
skb->ip_summed = CHECKSUM_NONE;
29892993
} else {
29902994
skb->csum = ntohs((u16)(rx_cmd_b >> RX_CMD_B_CSUM_SHIFT_));

0 commit comments

Comments
 (0)