Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Kashyap, Desai and committed by
James Bottomley
c55b89fb f44fd181

+5 -5
+5 -5
drivers/message/fusion/mptbase.c
··· 1015 1015 { 1016 1016 SGESimple64_t *pSge = (SGESimple64_t *) pAddr; 1017 1017 pSge->Address.Low = cpu_to_le32 1018 - (lower_32_bits((unsigned long)(dma_addr))); 1018 + (lower_32_bits(dma_addr)); 1019 1019 pSge->Address.High = cpu_to_le32 1020 - (upper_32_bits((unsigned long)dma_addr)); 1020 + (upper_32_bits(dma_addr)); 1021 1021 pSge->FlagsLength = cpu_to_le32 1022 1022 ((flagslength | MPT_SGE_FLAGS_64_BIT_ADDRESSING)); 1023 1023 } ··· 1038 1038 u32 tmp; 1039 1039 1040 1040 pSge->Address.Low = cpu_to_le32 1041 - (lower_32_bits((unsigned long)(dma_addr))); 1042 - tmp = (u32)(upper_32_bits((unsigned long)dma_addr)); 1041 + (lower_32_bits(dma_addr)); 1042 + tmp = (u32)(upper_32_bits(dma_addr)); 1043 1043 1044 1044 /* 1045 1045 * 1078 errata workaround for the 36GB limitation ··· 1101 1101 pChain->NextChainOffset = next; 1102 1102 1103 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 1105 pChain->Address.High = cpu_to_le32(tmp); 1106 1106 } 1107 1107