android_kernel_motorola_sm6225/drivers
Linas Vepstas 33bdeec806 spidernet: Fix problem sending IP fragments
The basic structure of "normal" UDP/IP/Ethernet
frames (that actually work):
 - It starts with the Ethernet header (dest MAC, src MAC, etc.)
 - The next part is occupied by the IP header (version info, length of
packet, id=0, fragment offset=0, checksum, from / to address, etc.)
 - Then comes the UDP header (src / dest port, length, checksum)
 - Actual payload
 - Ethernet checksum

Now what's different for IP fragment:
 - The IP header has id set to some value (same for all fragments),
offset is set appropriately (i.e. 0 for first fragment, following
according to size of other fragments), size is the length of the frame.
 - UDP header is unchanged. I.e. length is according to full UDP
datagram, not just the part within the actual frame! But this is only
true within the first frame: all following frames don't have a valid
UDP-header at all.

The spidernet silicon seems to be quite intelligent: It's able to
compute (IP / UDP / Ethernet) checksums on the fly and tests if frames
are conforming to RFC -- at least conforming to RFC on complete frames.

But IP fragments are different as explained above:
I.e. for IP fragments containing part of a UDP datagram it sees
incompatible length in the headers for IP and UDP in the first frame
and, thus, skips this frame. But the content *is* correct for IP
fragments. For all following frames it finds (most probably) no valid
UDP header at all. But this *is* also correct for IP fragments.

The Linux IP-stack seems to be clever in this point. It expects the
spidernet to calculate the checksum (since the module claims to be able
to do so) and marks the skb's for "normal" frames accordingly
(ip_summed set to CHECKSUM_HW).
But for the IP fragments it does not expect the driver to be capable to
handle the frames appropriately. Thus all checksums are allready
computed. This is also flaged within the skb (ip_summed set to
CHECKSUM_NONE).

Unfortunately the spidernet driver ignores that hints. It tries to send
the IP fragments of UDP datagrams as normal UDP/IP frames. Since they
have different structure the silicon detects them the be not
"well-formed" and skips them.

The following one-liner against 2.6.21-rc2 changes this behavior. If the
IP-stack claims to have done the checksumming, the driver should not
try to checksum (and analyze) the frame but send it as is.

Signed-off-by: Norbert Eicker <n.eicker@fz-juelich.de>
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-19 15:01:16 -04:00
..
acorn [ARM] Acorn: move the i2c bus driver into drivers/i2c 2007-03-04 20:40:50 +00:00
acpi Revert "ACPI: parse 2nd MADT by default" 2007-03-30 14:16:10 -04:00
amba
ata Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev 2007-04-04 08:44:40 -07:00
atm [PATCH] zatm __init abuse 2007-03-14 15:27:49 -07:00
auxdisplay [PATCH] cfag12864b: fix crash when built-in and no parport present 2007-02-20 17:10:14 -08:00
base [PATCH] PM: use kobject_name() to access kobject names 2007-04-11 15:39:39 -07:00
block [PATCH] cciss: unregister from SCSI before tearing down device resources 2007-04-12 15:31:42 -07:00
bluetooth [Bluetooth] Make use of MODULE_FIRMWARE 2007-02-26 11:42:42 -08:00
cdrom [PATCH] Fix soft lockup with iSeries viocd driver 2007-03-05 07:57:51 -08:00
char fix bogon in /dev/mem mmap'ing on nommu 2007-04-17 16:36:27 -07:00
clocksource [PATCH] correct slow acpi_pm rating 2007-03-27 09:05:15 -07:00
connector [CONNECTOR]: Bugfix for cn_call_callback() 2007-03-07 16:08:08 -08:00
cpufreq [PATCH] Fix maxcpus=1 trigerring BUG() in cpufreq 2007-03-27 08:55:56 -07:00
crypto [PATCH] geode-aes: use unsigned long for spin_lock_irqsave 2007-03-06 09:30:25 -08:00
dio
dma [PATCH] rm pointless dmaengine exports 2007-03-16 19:25:03 -07:00
edac
eisa [PATCH] drivers/eisa/pci_eisa.c:pci_eisa_init() should be init 2007-03-27 09:05:15 -07:00
fc4
firmware
hid HID: Do not discard truncated input reports 2007-04-05 16:06:30 +02:00
hwmon hwmon/w83627ehf: Fix the fan5 clock divider write 2007-04-17 16:36:27 -07:00
i2c Minor bug fixes to i2c-pasemi 2007-04-17 16:36:28 -07:00
ide ide: add "optical" to sysfs "media" attribute 2007-04-10 22:39:14 +02:00
ieee1394 ieee1394: change deprecation status of dv1394 2007-04-09 18:52:27 +02:00
infiniband IB/mthca: Fix data corruption after FMR unmap on Sinai 2007-04-16 14:10:55 -07:00
input [PATCH] Input: ucb1400 - set up driver's name to show in sysfs 2007-04-10 17:26:33 -07:00
isdn [PATCH] drivers/isdn/gigaset: mark some static data as const (v2) 2007-03-29 08:22:25 -07:00
kvm KVM: Fix off-by-one when writing to a nonpae guest pde 2007-04-19 18:39:26 +03:00
leds
macintosh drivers/macintosh/smu.c: fix locking snafu 2007-04-17 16:36:27 -07:00
mca
md [PATCH] md: fix calculation for size of filemap_attr array in md/bitmap 2007-04-12 15:31:42 -07:00
media DVB: dvb-usb-remote - fix oops when changing keymap 2007-04-13 18:35:39 -07:00
message Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6 2007-03-27 10:06:30 -07:00
mfd [PATCH] drivers/mfd/sm501.c: fix an off-by-one 2007-04-02 10:06:08 -07:00
misc asus-laptop: make code static 2007-03-09 21:06:40 -05:00
mmc [ARM] 4256/1: i.MX/MX1 SDHC fix/workaround of SD card recognition problems 2007-03-12 16:49:37 +00:00
mtd [MTD] [OneNAND] Classify the page data and oob buffer 2007-03-09 08:08:09 +00:00
net spidernet: Fix problem sending IP fragments 2007-04-19 15:01:16 -04:00
nubus
oprofile [PATCH] oprofile: fix potential deadlock on oprofilefs_lock 2007-03-28 13:58:02 -07:00
parisc Merge master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6 2007-02-26 12:48:06 -08:00
parport [PATCH] parport_pc: fix parport_pc_probe_port section warning 2007-02-20 17:10:16 -08:00
pci [PATCH] msi: synchronously mask and unmask msi-x irqs. 2007-04-03 14:02:49 -07:00
pcmcia [PATCH] omap_cf: oops-on-suspend fix 2007-04-08 19:47:55 -07:00
pnp [PATCH] Correctly report PnP 64bit resources 2007-04-02 10:06:08 -07:00
ps3 [PATCH] C99 initializers, proper use of const in drivers/ps3 2007-03-14 15:27:50 -07:00
rapidio
rtc [PATCH] rtc-cmos lockdep fix, irq updates 2007-04-02 10:06:09 -07:00
s390 [S390] cio: Fix handling of interrupt for csch(). 2007-04-04 14:37:39 +02:00
sbus [SPARC] uctrl: Check request_irq() return value. 2007-02-26 11:35:51 -08:00
scsi Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 2007-04-14 21:41:12 -07:00
serial [PATCH] add Fujitsu Siemens Tablet PC devices to 8250_pnp.c 2007-03-23 11:01:22 -07:00
sh
sn
spi spi: fix use of set_cs in spi_s3c24xx driver 2007-04-17 16:36:27 -07:00
tc [PATCH] Fix build error on zs serial driver 2007-04-04 21:12:47 -07:00
telephony
usb USB: Nikon D80 unusual device patch 2007-04-11 10:44:15 -07:00
video [VIDEO]: Fix section mismatch in cg3.c 2007-03-28 12:50:56 -07:00
w1
zorro
Kconfig
Makefile