summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKashyap, Desai <kashyap.desai@lsi.com>2009-09-02 11:44:57 +0530
committerGreg Kroah-Hartman <gregkh@suse.de>2009-10-05 09:33:07 -0700
commit6177445fb4f5d65dde3c883b9987c840178fb86d (patch)
treeb3351aaea5636f8772a7f1d7912683bacb6b6ed8
parent1dbd009c9078b3491299722a9c0f1313fad0fc1b (diff)
downloadlinux-stable-6177445fb4f5d65dde3c883b9987c840178fb86d.tar.gz
linux-stable-6177445fb4f5d65dde3c883b9987c840178fb86d.tar.bz2
linux-stable-6177445fb4f5d65dde3c883b9987c840178fb86d.zip
mptsas : PAE Kernel more than 4 GB kernel panic
commit c55b89fba9872ebcd5ac15cdfdad29ffb89329f0 upstream. This patch is solving problem for PAE kernel DMA operation. On PAE system dma_addr and unsigned long will have different values. Now dma_addr is not type casted using unsigned long. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de> Cc: Jan Beulich <JBeulich@novell.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/message/fusion/mptbase.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index 5d0ba4f5924c..9ad7bb4e721f 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -1015,9 +1015,9 @@ mpt_add_sge_64bit(void *pAddr, u32 flagslength, dma_addr_t dma_addr)
{
SGESimple64_t *pSge = (SGESimple64_t *) pAddr;
pSge->Address.Low = cpu_to_le32
- (lower_32_bits((unsigned long)(dma_addr)));
+ (lower_32_bits(dma_addr));
pSge->Address.High = cpu_to_le32
- (upper_32_bits((unsigned long)dma_addr));
+ (upper_32_bits(dma_addr));
pSge->FlagsLength = cpu_to_le32
((flagslength | MPT_SGE_FLAGS_64_BIT_ADDRESSING));
}
@@ -1038,8 +1038,8 @@ mpt_add_sge_64bit_1078(void *pAddr, u32 flagslength, dma_addr_t dma_addr)
u32 tmp;
pSge->Address.Low = cpu_to_le32
- (lower_32_bits((unsigned long)(dma_addr)));
- tmp = (u32)(upper_32_bits((unsigned long)dma_addr));
+ (lower_32_bits(dma_addr));
+ tmp = (u32)(upper_32_bits(dma_addr));
/*
* 1078 errata workaround for the 36GB limitation
@@ -1101,7 +1101,7 @@ mpt_add_chain_64bit(void *pAddr, u8 next, u16 length, dma_addr_t dma_addr)
pChain->NextChainOffset = next;
pChain->Address.Low = cpu_to_le32(tmp);
- tmp = (u32)(upper_32_bits((unsigned long)dma_addr));
+ tmp = (u32)(upper_32_bits(dma_addr));
pChain->Address.High = cpu_to_le32(tmp);
}