2006-10-13 17:32:12

by Anil kumar

[permalink] [raw]
Subject: page_address issue

Hi,

How can I confirm if the address returned from
page_address is correct?
The system is EM64T. My hardware supports only 32bit
DMA.
The kernel is 2.6.16 based (SLES10).
The following is the snippet of the code:
if(cmd->use_sg){

unsigned char *pBuf;
sg = (struct scatterlist *)cmd->request_buffer;

pBuf = (unsigned char
*)page_address(sg->page)+sg->offset

}

The number of DMA buffers returned from dma_map_sg is
one.
I don't think it involves any page boundary issues as
the length of the buffer and offset are well within
the page.
The command is Inquiry.
I checked the page is a NOT a HighMemPage

The system is 64bit, but the hardware dma capability
is only 32bit. Has this got something to do?
I also checked swiotlb is enabled.

Any help is greatly appreciated.

with regards,
Anil


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com