rpms/kernel/F-9 linux-2.6-wireless-ath9k-check-broken-iommu.patch, NONE, 1.1 config-generic, 1.124, 1.125 kernel.spec, 1.856, 1.857

Chuck Ebbert cebbert at fedoraproject.org
Tue Nov 18 18:11:22 UTC 2008


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv31598

Modified Files:
	config-generic kernel.spec 
Added Files:
	linux-2.6-wireless-ath9k-check-broken-iommu.patch 
Log Message:
Disable ath9k when swiotlb is in use, re-enable driver (#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: config-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-9/config-generic,v
retrieving revision 1.124
retrieving revision 1.125
diff -u -r1.124 -r1.125
--- config-generic	14 Nov 2008 00:51:23 -0000	1.124
+++ config-generic	18 Nov 2008 18:10:51 -0000	1.125
@@ -1315,7 +1315,7 @@
 CONFIG_ADM8211=m
 CONFIG_ATH5K=m
 CONFIG_ATH5K_DEBUG=y
-# CONFIG_ATH9K is not set
+CONFIG_ATH9K=m
 CONFIG_AIRO=m
 CONFIG_AIRO_CS=m
 CONFIG_ATMEL=m


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-9/kernel.spec,v
retrieving revision 1.856
retrieving revision 1.857
diff -u -r1.856 -r1.857
--- kernel.spec	17 Nov 2008 15:12:07 -0000	1.856
+++ kernel.spec	18 Nov 2008 18:10:51 -0000	1.857
@@ -667,6 +667,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
 
@@ -1240,6 +1241,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
+
 # implement smarter atime updates support.
 ApplyPatch linux-2.6-smarter-relatime.patch
 
@@ -1890,6 +1894,9 @@
 %kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL}.xen -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.xen.conf %{with_xen} xen
 
 %changelog
+* Tue Nov 18 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.27.6-44
+- Disable ath9k when swiotlb is in use, re-enable driver (#471329)
+
 * Mon Nov 17 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.27.6-43
 - Linux 2.6.27.6
   Dropped patches:




More information about the scm-commits mailing list