[PATCH] smsc95xx: fix tx checksum offload for big endian

Subsystems: networking drivers, the rest, usb networking drivers, usb smsc95xx ethernet driver

STALE5039d

2 messages, 2 authors, 2012-11-03 · open the first message on its own page

[PATCH] smsc95xx: fix tx checksum offload for big endian

From: Steve Glendinning <steve.glendinning@shawell.net>
Date: 2012-11-02 10:44:32

f7b2927 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: Steve Glendinning <steve.glendinning@shawell.net>
---
 drivers/net/usb/smsc95xx.c |    1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
index 46cd784..34f2e78 100644
--- a/drivers/net/usb/smsc95xx.c
+++ b/drivers/net/usb/smsc95xx.c
@@ -1398,6 +1398,7 @@ static struct sk_buff *smsc95xx_tx_fixup(struct usbnet *dev,
 		} else {
 			u32 csum_preamble = smsc95xx_calc_csum_preamble(skb);
 			skb_push(skb, 4);
+			cpu_to_le32s(&csum_preamble);
 			memcpy(skb->data, &csum_preamble, 4);
 		}
 	}
-- 
1.7.10.4

Re: [PATCH] smsc95xx: fix tx checksum offload for big endian

From: David Miller <davem@davemloft.net>
Date: 2012-11-03 19:30:46

From: Steve Glendinning <steve.glendinning@shawell.net>
Date: Fri,  2 Nov 2012 10:44:20 +0000
f7b2927 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: Steve Glendinning <steve.glendinning@shawell.net>
Applied and queued up for -stable, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help