| To: | linux-mips@linux-mips.org |
|---|---|
| Subject: | patch to kaweth.c to align IP header |
| From: | Quinn Jensen <jensenq@Lineo.COM> |
| Date: | Wed, 04 Sep 2002 12:26:58 -0600 |
| Organization: | Lineo, Inc. |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| Sender: | linux-mips-bounce@linux-mips.org |
| User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.8) Gecko/20020204 |
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 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);
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: soft-float defines in mips-linux gcc config, Jay Carlson |
|---|---|
| Next by Date: | Re: 64-bit and N32 kernel interfaces, Ralf Baechle |
| Previous by Thread: | [patch] 2.4.19: Support R4000 as a distinct CPU type, Maciej W. Rozycki |
| Next by Thread: | Re: patch to kaweth.c to align IP header, Alan Cox |
| Indexes: | [Date] [Thread] [Top] [All Lists] |