Fix iwlan DMA mapping direction
authorFenghua Yu <fenghua.yu@intel.com>
Wed, 25 Feb 2009 05:06:26 +0000 (14:06 +0900)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 25 Feb 2009 17:30:56 +0000 (09:30 -0800)
commit6aa03ab06978e97b3e0720f83280d7841051916b
treea3575e24836180935611515a3610b59b3a642982
parent694593e3374a67d95ece6a275a1f181644c2c4d8
Fix iwlan DMA mapping direction

When iwlan runs on IOMMU, IOMMU generates a lot of PTE write faults
because PTE write bit is not set on some of PTE's.  This is because
iwlan driver calls DMA mapping with PCI_DMA_TODEVICE which is read only
in mapping PTE.  But iwlan device actually writes to the mapped page to
update its contents.  This issue is not exposed in swiotlb.  But VT-d
hardware can capture this fault and stop the fault transaction.

The following patch fixes the issue.

Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Reviewed-by: Bhavesh Davda <bhavesh@vmware.com>
Tested-by: Chris Wright <chrisw@sous-sol.org>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/net/wireless/iwlwifi/iwl-tx.c