[kernel] r16744 - in dists/trunk/linux-2.6/debian: . patches/bugfix/mips patches/series

Ben Hutchings benh at alioth.debian.org
Wed Dec 29 06:22:42 UTC 2010


Author: benh
Date: Wed Dec 29 06:22:34 2010
New Revision: 16744

Log:
starfire: Fix dma_addr_t size test for MIPS (fixes FTBFS)

Added:
   dists/trunk/linux-2.6/debian/patches/bugfix/mips/starfire-Fix-dma_addr_t-size-test-for-MIPS.patch
Modified:
   dists/trunk/linux-2.6/debian/changelog
   dists/trunk/linux-2.6/debian/patches/series/base

Modified: dists/trunk/linux-2.6/debian/changelog
==============================================================================
--- dists/trunk/linux-2.6/debian/changelog	Wed Dec 29 05:25:34 2010	(r16743)
+++ dists/trunk/linux-2.6/debian/changelog	Wed Dec 29 06:22:34 2010	(r16744)
@@ -4,6 +4,7 @@
 
   [ Ben Hutchings ]
   * i2c-i801: Include <linux/slab.h> (fixes FTBFS on alpha)
+  * starfire: Fix dma_addr_t size test for MIPS (fixes FTBFS)
 
  -- Ben Hutchings <ben at decadent.org.uk>  Tue, 28 Dec 2010 03:15:05 +0000
 

Added: dists/trunk/linux-2.6/debian/patches/bugfix/mips/starfire-Fix-dma_addr_t-size-test-for-MIPS.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/trunk/linux-2.6/debian/patches/bugfix/mips/starfire-Fix-dma_addr_t-size-test-for-MIPS.patch	Wed Dec 29 06:22:34 2010	(r16744)
@@ -0,0 +1,36 @@
+From b618f255525fcaa396f470aefeb144d049a3f7b6 Mon Sep 17 00:00:00 2001
+From: Ben Hutchings <ben at decadent.org.uk>
+Date: Tue, 28 Dec 2010 04:01:32 +0000
+Subject: [PATCH] starfire: Fix dma_addr_t size test for MIPS
+
+Commit 56543af "starfire: use BUILD_BUG_ON for netdrv_addr_t" revealed
+that the preprocessor condition used to find the size of dma_addr_t
+yielded the wrong result for some architectures and configurations.
+This was kluged for 64-bit PowerPC in commit 3e502e6 by adding yet
+another case to the condition.  However, some MIPS configurations are
+still handled incorrectly.
+
+This should be fixed by using CONFIG_ARCH_DMA_ADDR_T_64BIT, but that
+isn't yet defined everywhere it should be.
+
+Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
+---
+ drivers/net/starfire.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c
+index 4adf124..a4f2bd5 100644
+--- a/drivers/net/starfire.c
++++ b/drivers/net/starfire.c
+@@ -148,7 +148,7 @@ static int full_duplex[MAX_UNITS] = {0, };
+  * This SUCKS.
+  * We need a much better method to determine if dma_addr_t is 64-bit.
+  */
+-#if (defined(__i386__) && defined(CONFIG_HIGHMEM64G)) || defined(__x86_64__) || defined (__ia64__) || defined(__alpha__) || defined(__mips64__) || (defined(__mips__) && defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) || (defined(__powerpc64__) || defined(CONFIG_PHYS_64BIT))
++#if (defined(__i386__) && defined(CONFIG_HIGHMEM64G)) || defined(__x86_64__) || defined (__ia64__) || defined(__alpha__) || (defined(CONFIG_MIPS) && ((defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) || defined(CONFIG_64BIT))) || (defined(__powerpc64__) || defined(CONFIG_PHYS_64BIT))
+ /* 64-bit dma_addr_t */
+ #define ADDR_64BITS	/* This chip uses 64 bit addresses. */
+ #define netdrv_addr_t __le64
+-- 
+1.7.2.3
+

Modified: dists/trunk/linux-2.6/debian/patches/series/base
==============================================================================
--- dists/trunk/linux-2.6/debian/patches/series/base	Wed Dec 29 05:25:34 2010	(r16743)
+++ dists/trunk/linux-2.6/debian/patches/series/base	Wed Dec 29 06:22:34 2010	(r16744)
@@ -45,3 +45,4 @@
 + debian/alpha-Do-not-use-Werror-for-arch-alpha.patch
 + bugfix/all/drm-nouveau-Only-select-ACPI_VIDEO-if-its-dependenci.patch
 + bugfix/all/i2c-i801-Include-linux-slab.h.patch
++ bugfix/mips/starfire-Fix-dma_addr_t-size-test-for-MIPS.patch



More information about the Kernel-svn-changes mailing list