提交 38a8fc0f 编写于 作者: D Divy Le Ray 提交者: David S. Miller

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: NDivy Le Ray <divy@chelsio.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d41a5b7d
...@@ -353,6 +353,9 @@ int t3_mac_set_mtu(struct cmac *mac, unsigned int mtu) ...@@ -353,6 +353,9 @@ int t3_mac_set_mtu(struct cmac *mac, unsigned int mtu)
* packet size register includes header, but not FCS. * packet size register includes header, but not FCS.
*/ */
mtu += 14; mtu += 14;
if (mtu > 1536)
mtu += 4;
if (mtu > MAX_FRAME_SIZE - 4) if (mtu > MAX_FRAME_SIZE - 4)
return -EINVAL; return -EINVAL;
t3_write_reg(adap, A_XGM_RX_MAX_PKT_SIZE + mac->offset, mtu); t3_write_reg(adap, A_XGM_RX_MAX_PKT_SIZE + mac->offset, mtu);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册