linux/drivers/net/wireless
Johannes Berg 4018517a1a iwlagn: fix RX skb alignment
So I dug deeper into the DMA problems I had with iwlagn and a kind soul
helped me in that he said something about pci-e alignment and mentioned
the iwl_rx_allocate function to check for crossing 4KB boundaries. Since
there's 8KB A-MPDU support, crossing 4k boundaries didn't seem like
something the device would fail with, but when I looked into the
function for a minute anyway I stumbled over this little gem:

	BUG_ON(rxb->dma_addr & (~DMA_BIT_MASK(36) & 0xff));

Clearly, that is a totally bogus check, one would hope the compiler
removes it entirely. (Think about it)

After fixing it, I obviously ran into it, nothing guarantees the
alignment the way you want it,  because of the way skbs and their
headroom are allocated. I won't explain that here nor double-check that
I'm right, that goes beyond what most of the CC'ed people care about.

So then I came up with the patch below, and so far my system has
survived minutes with 64K pages, when it would previously fail in
seconds. And I haven't seen a single instance of the TX bug either. But
when you see the patch it'll be pretty obvious to you why.

This should fix the following reported kernel bugs:

http://bugzilla.kernel.org/show_bug.cgi?id=11596
http://bugzilla.kernel.org/show_bug.cgi?id=11393
http://bugzilla.kernel.org/show_bug.cgi?id=11983

I haven't checked if there are any elsewhere, but I suppose RHBZ will
have a few instances too...

I'd like to ask anyone who is CC'ed (those are people I know ran into
the bug) to try this patch.

I am convinced that this patch is correct in spirit, but I haven't
understood why, for example, there are so many unmap calls. I'm not
entirely convinced that this is the only bug leading to the TX reply
errors.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-11-18 17:26:26 -05:00
..
ath5k ath5k: correct handling of rx status fields 2008-11-06 16:37:11 -05:00
ath9k ath9k/mac80211: disallow fragmentation in ath9k, report to userspace 2008-10-14 21:12:37 -04:00
b43 Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6 2008-10-13 14:12:40 -07:00
b43legacy mac80211: add multi-rate retry support 2008-10-06 18:14:57 -04:00
hostap hostap: pad the skb->cb usage in lieu of a proper fix 2008-11-12 16:54:22 -05:00
iwlwifi iwlagn: fix RX skb alignment 2008-11-18 17:26:26 -05:00
libertas libertas: fix buffer overrun 2008-10-29 17:54:35 -04:00
libertas_tf libertas_tf: fix skb tail pointer 2008-11-18 17:26:26 -05:00
p54 p54: fix build warnings 2008-10-27 17:46:11 -04:00
prism54
rt2x00 rt2x00: Fix build error when mac80211=M rt2x00=Y 2008-10-29 17:54:35 -04:00
zd1211rw zd1211rw: Add 2 device IDs 2008-11-06 16:37:10 -05:00
Kconfig
Makefile
adm8211.c
adm8211.h
airo.c
airo.h
airo_cs.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6 2008-10-13 14:12:40 -07:00
airport.c
arlan-main.c
arlan-proc.c
arlan.h
atmel.c
atmel.h
atmel_cs.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6 2008-10-13 14:12:40 -07:00
atmel_pci.c
hermes.c
hermes.h
hermes_dld.c
hermes_dld.h
hermes_rid.h
i82586.h
i82593.h
ipw2100.c
ipw2100.h
ipw2200.c
ipw2200.h
mac80211_hwsim.c device create: net: convert device_create_drvdata to device_create 2008-10-16 09:24:43 -07:00
netwave_cs.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6 2008-10-13 14:12:40 -07:00
orinoco.c orinoco: reduce stack usage in firmware download path 2008-10-22 18:09:32 -04:00
orinoco.h
orinoco_cs.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-10-16 11:26:26 -07:00
orinoco_nortel.c
orinoco_pci.c
orinoco_pci.h
orinoco_plx.c
orinoco_tmd.c
ray_cs.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6 2008-10-13 14:12:40 -07:00
ray_cs.h
rayctl.h
rndis_wlan.c
rtl818x.h
rtl8180.h
rtl8180_dev.c mac80211: add multi-rate retry support 2008-10-06 18:14:57 -04:00
rtl8180_grf5101.c
rtl8180_grf5101.h
rtl8180_max2820.c
rtl8180_max2820.h
rtl8180_rtl8225.c
rtl8180_rtl8225.h
rtl8180_sa2400.c
rtl8180_sa2400.h
rtl8187.h
rtl8187_dev.c rtl8187 : support for Sitecom WL-168 0001 v4 2008-11-12 16:49:57 -05:00
rtl8187_rtl8225.c
rtl8187_rtl8225.h
spectrum_cs.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-10-16 11:26:26 -07:00
strip.c
wavelan.c net: Rationalise email address: Network Specific Parts 2008-10-13 19:01:08 -07:00
wavelan.h
wavelan.p.h net: Rationalise email address: Network Specific Parts 2008-10-13 19:01:08 -07:00
wavelan_cs.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6 2008-10-13 14:12:40 -07:00
wavelan_cs.h
wavelan_cs.p.h
wl3501.h
wl3501_cs.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6 2008-10-13 14:12:40 -07:00
zd1201.c
zd1201.h