rpms/kernel/F-11 linux-2.6-ppc64-vs-broadcom.patch, NONE, 1.1.2.1 kernel.spec, 1.1679.2.14, 1.1679.2.15

David Woodhouse dwmw2 at fedoraproject.org
Fri Aug 21 09:50:37 UTC 2009


Author: dwmw2

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

Modified Files:
      Tag: private-fedora-11-2_6_29_6
	kernel.spec 
Added Files:
      Tag: private-fedora-11-2_6_29_6
	linux-2.6-ppc64-vs-broadcom.patch 
Log Message:
backport fix for #514787

linux-2.6-ppc64-vs-broadcom.patch:
 dma.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

--- NEW FILE linux-2.6-ppc64-vs-broadcom.patch ---
>From b2f2e8fee3d62f621e795f25b2fc0f51bbdb4af9 Mon Sep 17 00:00:00 2001
From: Benjamin Herrenschmidt <benh at kernel.crashing.org>
Date: Mon, 10 Aug 2009 16:36:38 +1000
Subject: [PATCH] powerpc/dma: pci_set_dma_mask() shouldn't fail if mask fits in RAM

On an iMac G5, the b43 driver is failing to initialise because trying to
set the dma mask to 30-bit fails. Even though there's only 512MiB of RAM
in the machine anyway:
	https://bugzilla.redhat.com/show_bug.cgi?id=514787

We should probably let it succeed if the available RAM in the system
doesn't exceed the requested limit.

Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
---
 arch/powerpc/kernel/dma.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c
index 20a60d6..ccf129d 100644
--- a/arch/powerpc/kernel/dma.c
+++ b/arch/powerpc/kernel/dma.c
@@ -7,6 +7,7 @@
 
 #include <linux/device.h>
 #include <linux/dma-mapping.h>
+#include <linux/lmb.h>
 #include <asm/bug.h>
 #include <asm/abs_addr.h>
 
@@ -90,11 +91,10 @@ static void dma_direct_unmap_sg(struct device *dev, struct scatterlist *sg,
 static int dma_direct_dma_supported(struct device *dev, u64 mask)
 {
 #ifdef CONFIG_PPC64
-	/* Could be improved to check for memory though it better be
-	 * done via some global so platforms can set the limit in case
+	/* Could be improved so platforms can set the limit in case
 	 * they have limited DMA windows
 	 */
-	return mask >= DMA_32BIT_MASK;
+	return mask >= (lmb_end_of_DRAM() - 1);
 #else
 	return 1;
 #endif
-- 
1.6.2.5



Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/kernel.spec,v
retrieving revision 1.1679.2.14
retrieving revision 1.1679.2.15
diff -u -p -r1.1679.2.14 -r1.1679.2.15
--- kernel.spec	19 Aug 2009 14:21:52 -0000	1.1679.2.14
+++ kernel.spec	21 Aug 2009 09:50:36 -0000	1.1679.2.15
@@ -620,6 +620,7 @@ Patch141: linux-2.6-ps3-storage-alias.pa
 Patch143: linux-2.6-g5-therm-shutdown.patch
 Patch144: linux-2.6-vio-modalias.patch
 Patch147: linux-2.6-imac-transparent-bridge.patch
+Patch148: linux-2.6-ppc64-vs-broadcom.patch
 
 Patch150: linux-2.6.29-sparc-IOC_TYPECHECK.patch
 
@@ -1266,6 +1267,8 @@ ApplyPatch linux-2.6-g5-therm-shutdown.p
 ApplyPatch linux-2.6-vio-modalias.patch
 # Work around PCIe bridge setup on iSight
 ApplyPatch linux-2.6-imac-transparent-bridge.patch
+# Fix b43 support on no-iommu devices with <1GiB RAM
+ApplyPatch linux-2.6-ppc64-vs-broadcom.patch
 
 #
 # SPARC64
@@ -2164,6 +2167,9 @@ fi
 # and build.
 
 %changelog
+* Fri Aug 21 2009 David Woodhouse <David.Woodhouse at intel.com>
+- Fix b43 on iMac G5 (#514787)
+
 * Tue Aug 18 2009 Kyle McMartin <kyle at redhat.com>
 - CVE-2009-2848: execve: must clear current->clear_child_tid
 - Cherry pick upstream commits 52dec22e739eec8f3a0154f768a599f5489048bd




More information about the fedora-extras-commits mailing list