Created attachment 341029 [details] upstream backport of iwlwifi-fix-TX-cmd-dma-unmapping.patch to 5.4 Description of problem: When enabling the Intel VT-d support on a Dell E6500 with an Intel 5100 wireless device, the system will crash when it tries to configure the wireless. Version-Release number of selected component (if applicable): How reproducible: Every time on boot if: An Intel system with VT-d support, and a RHEL5.4 kernel with VT-d support included & enabled(intel_iommu=on), and an Intel 5100 wireless is enabled to be configured. Steps to Reproduce: Can also do this: 1. blacklist iwlagn in /etc/modprobe.conf 2. bring up aforementioned hw & kernel 3. modprobe iwlagn 4. iwconfig wlan0 essid <local wireless pt> 5. dhclient wlan0 ^-- crashes here Actual results: Crashes. Expected results: System continues to operate. Wireless configures successfully. Additional info: (1) Took the rhel5.4-140 iwl driver and added the posted patches for BZ 474699 (address problems switching btwn WPA & WEP) because it had RX skb alignment fixes -- still crashed with this patch. (2) backported the following upstream commit to the iwl driver: 499b1883038a7db2dcf8b64229f8533ce2c8f0fc (will attach the backported version for review). -- This stopped the iwl from crashing the kernel, but the iwl wouldn't successfully configure either; so, not sure if it cured one problem, created another, or just avoided the original iwl DMA mapping problem. (3) this type of DMA mapping error has been seen in other upstream drivers when Intel Vt-d was enabled, and DMA mapping bugs show up once real IOMMUs are in the hw path. Typically, the driver error is due to multiple dma-like free/unmaps, improper params' passed to dma_[un]map_single(), etc. Although laptops are not a primary target for RHEL5.4+KVM+VTd, the chip set used in them is common in other laptops (Thinkpad x200, Dell E6400, etc.), and are used by numerous KVM & VTD developers as test machines (due to portability, costs, etc.). Several patches to the VT-d code have been made to accomodate these machines, or the drivers they use, in order to keep this set of developers 'healthy'. To encourage RHEL5.4 use, a fix for the RHEL5.4 iwlwifi driver would be prudent.
Don, your patch is not applicable. It is partially in reverse direction and partially forward. But in general it looks good, I did not see any backporting bugs in there. Could you provide dmesg output when device fail to configure after patch applied.
I made a new backport as Don patch is a bit messy. It consist of two upstream commits: commit 499b1883038a7db2dcf8b64229f8533ce2c8f0fc Author: Tomas Winkler <tomas.winkler> Date: Tue Oct 14 12:32:48 2008 -0700 iwlwifi: fix TX cmd dma unmapping commit 6aa03ab06978e97b3e0720f83280d7841051916b Author: Fenghua Yu <fenghua.yu> Date: Wed Feb 25 14:06:26 2009 +0900 Fix iwlan DMA mapping direction I compiled in only, Don can give patch a try. There are further DMA related fixes in upstream: commit 96891ceedaeaac95aa5b9dba5e68a8e77d541e78 Author: Fenghua Yu <fenghua.yu> Date: Wed Feb 18 15:54:33 2009 -0800 iwlwifi: dma mapping read and write change commit: df833b1d73680f9f9dc72cbc3215edbbc6ab740d Author: Reinette Chatre <reinette.chatre> Date: Tue Apr 21 10:55:48 2009 -0700 iwlwifi: DMA fixes First one is not related with RHEL version, backporting of second is in progress
Created attachment 350422 [details] Proposed fix. Backport of 499b1883038a7db2dcf8b64229f8533ce2c8f0fc and 6aa03ab06978e97b3e0720f83280d7841051916b.
Comment on attachment 350422 [details] Proposed fix. Patch is broken.
Hi Don, Could you please test kernel from: http://people.redhat.com/linville/kernels/rhel5/ it should have this issue fixed.
Don reported issue is fixed. I tested against this bug as well. Closing it.