aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message
diff options
context:
space:
mode:
authorKashyap, Desai <kashyap.desai@lsi.com>2009-09-02 02:14:57 -0400
committerJames Bottomley <James.Bottomley@suse.de>2009-09-12 10:35:27 -0400
commitc55b89fba9872ebcd5ac15cdfdad29ffb89329f0 (patch)
tree1cef34d442b468ee483c4c0f6072980b5852e209 /drivers/message
parentf44fd18198eb26b62ba86b17016e9441ce95fc71 (diff)
[SCSI] mptsas : PAE Kernel more than 4 GB kernel panic
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>
Diffstat (limited to 'drivers/message')
-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 8ab7b37ed70d..76fa2ee0b574 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)
1015{ 1015{
1016 SGESimple64_t *pSge = (SGESimple64_t *) pAddr; 1016 SGESimple64_t *pSge = (SGESimple64_t *) pAddr;
1017 pSge->Address.Low = cpu_to_le32 1017 pSge->Address.Low = cpu_to_le32
1018 (lower_32_bits((unsigned long)(dma_addr))); 1018 (lower_32_bits(dma_addr));
1019 pSge->Address.High = cpu_to_le32 1019 pSge->Address.High = cpu_to_le32
1020 (upper_32_bits((unsigned long)dma_addr)); 1020 (upper_32_bits(dma_addr));
1021 pSge->FlagsLength = cpu_to_le32 1021 pSge->FlagsLength = cpu_to_le32
1022 ((flagslength | MPT_SGE_FLAGS_64_BIT_ADDRESSING)); 1022 ((flagslength | MPT_SGE_FLAGS_64_BIT_ADDRESSING));
1023} 1023}
@@ -1038,8 +1038,8 @@ mpt_add_sge_64bit_1078(void *pAddr, u32 flagslength, dma_addr_t dma_addr)
1038 u32 tmp; 1038 u32 tmp;
1039 1039
1040 pSge->Address.Low = cpu_to_le32 1040 pSge->Address.Low = cpu_to_le32
1041 (lower_32_bits((unsigned long)(dma_addr))); 1041 (lower_32_bits(dma_addr));
1042 tmp = (u32)(upper_32_bits((unsigned long)dma_addr)); 1042 tmp = (u32)(upper_32_bits(dma_addr));
1043 1043
1044 /* 1044 /*
1045 * 1078 errata workaround for the 36GB limitation 1045 * 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)
1101 pChain->NextChainOffset = next; 1101 pChain->NextChainOffset = next;
1102 1102
1103 pChain->Address.Low = cpu_to_le32(tmp); 1103 pChain->Address.Low = cpu_to_le32(tmp);
1104 tmp = (u32)(upper_32_bits((unsigned long)dma_addr)); 1104 tmp = (u32)(upper_32_bits(dma_addr));
1105 pChain->Address.High = cpu_to_le32(tmp); 1105 pChain->Address.High = cpu_to_le32(tmp);
1106} 1106}
1107 1107