diff options
author | Divy Le Ray <divy@chelsio.com> | 2010-02-13 04:44:30 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-16 00:49:48 -0500 |
commit | 38a8fc0fcf86f131f8bddf3787f9dfa7325bd981 (patch) | |
tree | 7cb8365ca766c7cbe1092f365ed50f12fdc0c792 | |
parent | d41a5b7da223f7a80844fb3e948e8d5e6181f214 (diff) |
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 <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/cxgb3/xgmac.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/cxgb3/xgmac.c b/drivers/net/cxgb3/xgmac.c index 0109ee4f2f9..0c08de5d09f 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) | |||
353 | * packet size register includes header, but not FCS. | 353 | * packet size register includes header, but not FCS. |
354 | */ | 354 | */ |
355 | mtu += 14; | 355 | mtu += 14; |
356 | if (mtu > 1536) | ||
357 | mtu += 4; | ||
358 | |||
356 | if (mtu > MAX_FRAME_SIZE - 4) | 359 | if (mtu > MAX_FRAME_SIZE - 4) |
357 | return -EINVAL; | 360 | return -EINVAL; |
358 | t3_write_reg(adap, A_XGM_RX_MAX_PKT_SIZE + mac->offset, mtu); | 361 | t3_write_reg(adap, A_XGM_RX_MAX_PKT_SIZE + mac->offset, mtu); |