From: Quinn Jensen <jensenq@Lineo.COM>
To: linux-mips@linux-mips.org
Subject: patch to kaweth.c to align IP header
Date: Wed, 04 Sep 2002 12:26:58 -0600 [thread overview]
Message-ID: <3D765072.60208@Lineo.COM> (raw)
[-- 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);
next reply other threads:[~2002-09-04 18:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-04 18:26 Quinn Jensen [this message]
2002-09-04 23:34 ` patch to kaweth.c to align IP header 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3D765072.60208@Lineo.COM \
--to=jensenq@lineo.com \
--cc=linux-mips@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox