提交 00acda68 编写于 作者: S Steve Glendinning 提交者: David S. Miller

smsc95xx: fix tx checksum offload for big endian

f7b29271 introduced tx checksum offload support for smsc95xx,
and enabled it by default. This feature doesn't take
endianness into account, so causes most tx to fail on
those platforms.

This patch fixes the problem fully by adding the missing
conversion.

An alternate workaround is to disable TX checksum offload
on those platforms. The cpu impact of this feature is very low.
Signed-off-by: NSteve Glendinning <steve.glendinning@shawell.net>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 a7a558fe
...@@ -1344,6 +1344,7 @@ static struct sk_buff *smsc95xx_tx_fixup(struct usbnet *dev, ...@@ -1344,6 +1344,7 @@ static struct sk_buff *smsc95xx_tx_fixup(struct usbnet *dev,
} else { } else {
u32 csum_preamble = smsc95xx_calc_csum_preamble(skb); u32 csum_preamble = smsc95xx_calc_csum_preamble(skb);
skb_push(skb, 4); skb_push(skb, 4);
cpu_to_le32s(&csum_preamble);
memcpy(skb->data, &csum_preamble, 4); memcpy(skb->data, &csum_preamble, 4);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册