Bug 497445 - iwlwifi crashes RHEL5.4-x86_64 on VT-d capable & enabled machine
iwlwifi crashes RHEL5.4-x86_64 on VT-d capable & enabled machine
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
All Linux
low Severity medium
: rc
: ---
Assigned To: Stanislaw Gruszka
Red Hat Kernel QE team
Depends On:
  Show dependency treegraph
Reported: 2009-04-23 18:20 EDT by Don Dutile
Modified: 2010-01-07 09:52 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-01-07 09:52:47 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
upstream backport of iwlwifi-fix-TX-cmd-dma-unmapping.patch to 5.4 (29.66 KB, patch)
2009-04-23 18:20 EDT, Don Dutile
no flags Details | Diff
Proposed fix. (28.90 KB, patch)
2009-07-03 09:02 EDT, Stanislaw Gruszka
no flags Details | Diff

  None (edit)
Description Don Dutile 2009-04-23 18:20:52 EDT
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:

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:
(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.
Comment 2 Stanislaw Gruszka 2009-07-03 08:55:26 EDT
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.
Comment 3 Stanislaw Gruszka 2009-07-03 08:59:42 EDT
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@intel.com>
Date:   Tue Oct 14 12:32:48 2008 -0700

    iwlwifi: fix TX cmd dma unmapping

commit 6aa03ab06978e97b3e0720f83280d7841051916b
Author: Fenghua Yu <fenghua.yu@intel.com>
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@intel.com>
Date:   Wed Feb 18 15:54:33 2009 -0800

    iwlwifi: dma mapping read and write change

commit: df833b1d73680f9f9dc72cbc3215edbbc6ab740d
Author: Reinette Chatre <reinette.chatre@intel.com>
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
Comment 4 Stanislaw Gruszka 2009-07-03 09:02:23 EDT
Created attachment 350422 [details]
Proposed fix.

Backport of 499b1883038a7db2dcf8b64229f8533ce2c8f0fc and 6aa03ab06978e97b3e0720f83280d7841051916b.
Comment 5 Stanislaw Gruszka 2009-10-23 08:02:43 EDT
Comment on attachment 350422 [details]
Proposed fix.

Patch is broken.
Comment 6 Stanislaw Gruszka 2009-12-02 04:28:38 EST
Hi Don,

Could you please test kernel from:


it should have this issue fixed.
Comment 7 Stanislaw Gruszka 2010-01-07 09:52:47 EST
Don reported issue is fixed. I tested against this bug as well. Closing it.

Note You need to log in before you can comment on or make changes to this bug.