Skip to content

Commit

Permalink
[SCSI] mptsas : PAE Kernel more than 4 GB kernel panic
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kashyap, Desai authored and James Bottomley committed Sep 12, 2009
1 parent f44fd18 commit c55b89f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/message/fusion/mptbase.c
Original file line number Diff line number Diff line change
@@ -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);
}

0 comments on commit c55b89f

Please sign in to comment.