From: Divy Le Ray Date: Sat, 13 Feb 2010 09:44:30 +0000 (+0000) Subject: cxgb3: FIx VLAN over Jumbo frames X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=38a8fc0fcf86f131f8bddf3787f9dfa7325bd981;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git cxgb3: FIx VLAN over Jumbo frames The mac is expected to auto-inflate the Maximum Frame size for VLAN tagged frames. It however does not work with jumbo frames. Work around the bug adding 4 to the Maximum Frame for MTUs greater than 1536. Signed-off-by: Divy Le Ray Signed-off-by: David S. Miller --- diff --git a/drivers/net/cxgb3/xgmac.c b/drivers/net/cxgb3/xgmac.c index 0109ee4f2f91..0c08de5d09fd 100644 --- a/drivers/net/cxgb3/xgmac.c +++ b/drivers/net/cxgb3/xgmac.c @@ -353,6 +353,9 @@ int t3_mac_set_mtu(struct cmac *mac, unsigned int mtu) * packet size register includes header, but not FCS. */ mtu += 14; + if (mtu > 1536) + mtu += 4; + if (mtu > MAX_FRAME_SIZE - 4) return -EINVAL; t3_write_reg(adap, A_XGM_RX_MAX_PKT_SIZE + mac->offset, mtu);