All of lore.kernel.org
 help / color / mirror / Atom feed
* patch to kaweth.c to align IP header
@ 2002-09-04 18:26 Quinn Jensen
  2002-09-04 23:34 ` Alan Cox
  0 siblings, 1 reply; 6+ messages in thread
From: Quinn Jensen @ 2002-09-04 18:26 UTC (permalink / raw)
  To: linux-mips

[-- Attachment #1: Type: text/plain, Size: 354 bytes --]

All,

The Kawasaki LSI USB Ethernet driver was causing a crash
in ipt_do_table() on mips because the address fields in
the IP header were not word aligned.  Many (all?) other
ethernet drivers do an skb_reserve of 2 to word align
the address fields, and doing this in kaweth.c fixed
my crash.

kernel: 2.4.17
hardware: Netgear EA101 USB Ethernet

Quinn



[-- Attachment #2: linuxtx-kaweth.patch --]
[-- Type: text/plain, Size: 439 bytes --]

diff -puN -r -X - linux/drivers/usb/kaweth.c linux.modified/drivers/usb/kaweth.c
--- linux/drivers/usb/kaweth.c	Tue Nov 13 10:19:41 2001
+++ linux.modified/drivers/usb/kaweth.c	Tue Sep  3 16:07:08 2002
@@ -514,6 +514,7 @@ static void kaweth_usb_receive(struct ur
 
 		skb->dev = net;
 
+		skb_reserve(skb, 2);    /* Align IP on 16 byte boundaries */
 		eth_copy_and_sum(skb, kaweth->rx_buf + 2, pkt_len, 0);
 		
 		skb_put(skb, pkt_len);


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

end of thread, other threads:[~2002-09-05 11:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-04 18:26 patch to kaweth.c to align IP header Quinn Jensen
2002-09-04 23:34 ` Alan Cox
2002-09-05  8:23   ` Kevin D. Kissell
2002-09-05  8:23     ` Kevin D. Kissell
2002-09-05  8:57     ` Carsten Langgaard
2002-09-05 11:22     ` Alan Cox

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.