ide dma in latest cvs
Does the latest CVS version work with an IDE controller in DMA mode?
I have an NEC VR5432 based system working with the IDE controller, but it crashes when used in dma mode. I've tracked it down to the following code called from ide_build_sglist():
- blk_rq_map_sg() is called to build a list of blocks to be transferred. It sets address = NULL for every entry (other fields like "page" are set to valid values).
- dma_cache_wback_inv(addr, size) is called for each block entry. This routine crashes because the address parameter is always set to zero when the routine is called.
I see that this is part of the new bio code recently added. Should I expect this code to work, or is it not yet working for the mips platform?
Thanks.
Gerald
Quoted 10 lines · Gerald Champagne
-
blk_rq_map_sg()is called to build a list of blocks to be transferred. It sets address = NULL for every entry (other fields like "page" are set to valid values).-
dma_cache_wback_inv(addr, size)is called for each block entry. This routine crashes because the address parameter is always set to zero when the routine is called.I see that this is part of the new bio code recently added. Should I expect this code to work, or is it not yet working for the mips platform?
I've encountered a similar problem on O2. You can probably fix it by adding the code for handling pages in pci_map_sg/pci_unmap_sg/pci_sync_sg. This is what I've done for ip32 and ip27:
unsigned long address;
if(sg->address)
address = sg->address;
else
address = page_address(sg->page) + sg->offset;
dma_cache_wback_inv(address, sg->length);
regards,
Vivien Chappelier.
Quoted 7 lines · Gerald Champagne
Does the latest CVS version work with an IDE controller in DMA mode?
I have an NEC VR5432 based system working with the IDE controller, but it crashes when used in dma mode. I've tracked it down to the following code called from
ide_build_sglist():
Quoted 8 lines
-
blk_rq_map_sg()is called to build a list of blocks to be transferred. It sets address = NULL for every entry (other fields like "page" are set to valid values).-
dma_cache_wback_inv(addr, size)is called for each block entry. This routine crashes because the address parameter is always set to zero when the routine is called.
Did you check what the address is and why it is zero? It seems to me this might be key ...
Jun
Quoted 2 lines
Did you check what the address is and why it is zero? It seems to me this might be key ...
I see what the address is and why it's set to zero. The address is the address of a block of data to be transferred using dma, and it's set to zero because the new interface in blk_rq_map_sg() passes parameters in a page field instead an address field. It looks like this is part of the bio changes for 2.5 that work for x86 but haven't been updated for Mips.
I figured that someone else must have run into this and it sounds like someone did. I'll try what Vivien Chappelier recommended in his response.
Thanks.
Gerald