rpms/kernel/F-10 linux-2.6-ppc64-vs-broadcom.patch, NONE, 1.1 kernel.spec, 1.1405, 1.1406

David Woodhouse dwmw2 at fedoraproject.org
Fri Aug 21 20:37:42 UTC 2009


Author: dwmw2

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

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-ppc64-vs-broadcom.patch 
Log Message:
fix b43 on imac g5 (#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-10/kernel.spec,v
retrieving revision 1.1405
retrieving revision 1.1406
diff -u -p -r1.1405 -r1.1406
--- kernel.spec	19 Aug 2009 14:21:15 -0000	1.1405
+++ kernel.spec	21 Aug 2009 20:37:42 -0000	1.1406
@@ -612,6 +612,7 @@ Patch142: linux-2.6-ps3-legacy-bootloade
 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
 Patch149: linux-2.6-efika-not-chrp.patch
 
 Patch160: linux-2.6-execshield.patch
@@ -1212,6 +1213,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 machines with <1GiB RAM
+ApplyPatch linux-2.6-ppc64-vs-broadcom.patch
 # Don't show 'CHRP' in /proc/cpuinfo on Efika
 #ApplyPatch linux-2.6-efika-not-chrp.patch
 
@@ -2031,6 +2034,9 @@ fi
 %kernel_variant_files -k vmlinux %{with_kdump} kdump
 
 %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
 - Backport several upstream commits 52dec22e739eec8f3a0154f768a599f5489048bd




More information about the fedora-extras-commits mailing list