rpms/kernel/F-10 linux-2.6-wireless-ath9k-check-broken-iommu.patch, NONE, 1.1 kernel.spec, 1.1152, 1.1153
Chuck Ebbert
cebbert at fedoraproject.org
Tue Nov 18 15:49:25 UTC 2008
Author: cebbert
Update of /cvs/pkgs/rpms/kernel/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv18811
Modified Files:
kernel.spec
Added Files:
linux-2.6-wireless-ath9k-check-broken-iommu.patch
Log Message:
Disable ath9k when swiotlb is in use (#471329)
linux-2.6-wireless-ath9k-check-broken-iommu.patch:
--- NEW FILE linux-2.6-wireless-ath9k-check-broken-iommu.patch ---
Don't activate ath9k adapters if swiotlb is in use.
bz #471329
Index: linux-2.6.27.noarch/arch/x86/kernel/pci-swiotlb_64.c
===================================================================
--- linux-2.6.27.noarch.orig/arch/x86/kernel/pci-swiotlb_64.c
+++ linux-2.6.27.noarch/arch/x86/kernel/pci-swiotlb_64.c
@@ -34,6 +34,7 @@ struct dma_mapping_ops swiotlb_dma_ops =
.unmap_sg = swiotlb_unmap_sg,
.dma_supported = NULL,
};
+EXPORT_SYMBOL(swiotlb_dma_ops);
void __init pci_swiotlb_init(void)
{
Index: linux-2.6.27.noarch/drivers/net/wireless/ath9k/main.c
===================================================================
--- linux-2.6.27.noarch.orig/drivers/net/wireless/ath9k/main.c
+++ linux-2.6.27.noarch/drivers/net/wireless/ath9k/main.c
@@ -1294,6 +1294,16 @@ bad:
return error;
}
+static int ath9k_pci_dma_broken(void)
+{
+#ifdef CONFIG_X86_64
+ extern struct dma_mapping_ops swiotlb_dma_ops;
+ return dma_ops == &swiotlb_dma_ops ? 1 : 0;
+#else
+ return 0;
+#endif
+}
+
static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
{
void __iomem *mem;
@@ -1304,6 +1314,11 @@ static int ath_pci_probe(struct pci_dev
u32 val;
int ret = 0;
+ if (ath9k_pci_dma_broken()) {
+ printk(KERN_ERR "ath_pci: software IOTLB in use, aborting\n");
+ return -ENODEV;
+ }
+
if (pci_enable_device(pdev))
return -EIO;
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-10/kernel.spec,v
retrieving revision 1.1152
retrieving revision 1.1153
diff -u -r1.1152 -r1.1153
--- kernel.spec 18 Nov 2008 07:09:47 -0000 1.1152
+++ kernel.spec 18 Nov 2008 15:48:54 -0000 1.1153
@@ -641,6 +641,7 @@
Patch683: linux-2.6-hostap-skb-cb-hack.patch
Patch690: linux-2.6-at76.patch
Patch691: linux-2.6-wireless-iwlagn-avoid-sleep-in-softirq.patch
+Patch692: linux-2.6-wireless-ath9k-check-broken-iommu.patch
Patch700: linux-2.6-nfs-client-mounts-hang.patch
@@ -1258,6 +1259,9 @@
# fix sleep-in-softirq that caused 'scheduling from idle thread'
ApplyPatch linux-2.6-wireless-iwlagn-avoid-sleep-in-softirq.patch
+# disable ath9k when swiotlb is in use
+ApplyPatch linux-2.6-wireless-ath9k-check-broken-iommu.patch
+
# NFS Client mounts hang when exported directory do not exist
ApplyPatch linux-2.6-nfs-client-mounts-hang.patch
@@ -1923,6 +1927,9 @@
%kernel_variant_files -k vmlinux %{with_kdump} kdump
%changelog
+* Tue Nov 18 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.27.5-117
+- Disable ath9k when swiotlb is in use (#471329)
+
* Tue Nov 18 2008 Dave Airlie <airlied at redhat.com> 2.6.27.5-116
- rebase to intel proper set of patches + test patch fix.
More information about the fedora-extras-commits
mailing list