netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] smsc95xx: fix tx checksum offload for big endian
@ 2012-11-02 10:44 Steve Glendinning
  2012-11-03 19:30 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Steve Glendinning @ 2012-11-02 10:44 UTC (permalink / raw)
  To: netdev; +Cc: jose.ventura, Steve Glendinning

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] smsc95xx: fix tx checksum offload for big endian
  2012-11-02 10:44 [PATCH] smsc95xx: fix tx checksum offload for big endian Steve Glendinning
@ 2012-11-03 19:30 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-11-03 19:30 UTC (permalink / raw)
  To: steve.glendinning; +Cc: netdev, jose.ventura

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-11-03 19:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-02 10:44 [PATCH] smsc95xx: fix tx checksum offload for big endian Steve Glendinning
2012-11-03 19:30 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).