diff options
Diffstat (limited to 'extras/recipes-kernel/linux/linux-omap/linus/0042-starfire-Fix-dma_addr_t-size-test-for-MIPS.patch')
-rw-r--r-- | extras/recipes-kernel/linux/linux-omap/linus/0042-starfire-Fix-dma_addr_t-size-test-for-MIPS.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0042-starfire-Fix-dma_addr_t-size-test-for-MIPS.patch b/extras/recipes-kernel/linux/linux-omap/linus/0042-starfire-Fix-dma_addr_t-size-test-for-MIPS.patch new file mode 100644 index 00000000..c2ed56ea --- /dev/null +++ b/extras/recipes-kernel/linux/linux-omap/linus/0042-starfire-Fix-dma_addr_t-size-test-for-MIPS.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | From f6a826af05cb9de0de0218f3cd05af203170fd12 Mon Sep 17 00:00:00 2001 | ||
2 | From: Ben Hutchings <ben@decadent.org.uk> | ||
3 | Date: Wed, 29 Dec 2010 04:26:17 +0000 | ||
4 | Subject: [PATCH 42/65] starfire: Fix dma_addr_t size test for MIPS | ||
5 | |||
6 | Commit 56543af "starfire: use BUILD_BUG_ON for netdrv_addr_t" revealed | ||
7 | that the preprocessor condition used to find the size of dma_addr_t | ||
8 | yielded the wrong result for some architectures and configurations. | ||
9 | This was kluged for 64-bit PowerPC in commit 3e502e6 by adding yet | ||
10 | another case to the condition. However, 64-bit MIPS configurations | ||
11 | are not detected reliably either. | ||
12 | |||
13 | This should be fixed by using CONFIG_ARCH_DMA_ADDR_T_64BIT, but that | ||
14 | isn't yet defined everywhere it should be. | ||
15 | |||
16 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
17 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
18 | --- | ||
19 | drivers/net/starfire.c | 2 +- | ||
20 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
21 | |||
22 | diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c | ||
23 | index 4adf124..a4f2bd5 100644 | ||
24 | --- a/drivers/net/starfire.c | ||
25 | +++ b/drivers/net/starfire.c | ||
26 | @@ -148,7 +148,7 @@ static int full_duplex[MAX_UNITS] = {0, }; | ||
27 | * This SUCKS. | ||
28 | * We need a much better method to determine if dma_addr_t is 64-bit. | ||
29 | */ | ||
30 | -#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)) | ||
31 | +#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)) | ||
32 | /* 64-bit dma_addr_t */ | ||
33 | #define ADDR_64BITS /* This chip uses 64 bit addresses. */ | ||
34 | #define netdrv_addr_t __le64 | ||
35 | -- | ||
36 | 1.6.6.1 | ||
37 | |||