* ide dma in latest cvs
@ 2002-01-21 23:48 Gerald Champagne
2002-01-22 11:33 ` Vivien Chappelier
2002-01-22 19:00 ` Jun Sun
0 siblings, 2 replies; 4+ messages in thread
From: Gerald Champagne @ 2002-01-21 23:48 UTC (permalink / raw)
To: linux-mips
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ide dma in latest cvs
2002-01-21 23:48 ide dma in latest cvs Gerald Champagne
@ 2002-01-22 11:33 ` Vivien Chappelier
2002-01-22 19:00 ` Jun Sun
1 sibling, 0 replies; 4+ messages in thread
From: Vivien Chappelier @ 2002-01-22 11:33 UTC (permalink / raw)
To: Gerald Champagne; +Cc: linux-mips
On Mon, 21 Jan 2002, Gerald Champagne wrote:
> - 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ide dma in latest cvs
2002-01-21 23:48 ide dma in latest cvs Gerald Champagne
2002-01-22 11:33 ` Vivien Chappelier
@ 2002-01-22 19:00 ` Jun Sun
2002-01-22 20:03 ` Gerald Champagne
1 sibling, 1 reply; 4+ messages in thread
From: Jun Sun @ 2002-01-22 19:00 UTC (permalink / raw)
To: Gerald Champagne; +Cc: linux-mips
Gerald Champagne wrote:
>
> 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.
>
Did you check what the address is and why it is zero? It seems to me this
might be key ...
Jun
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ide dma in latest cvs
2002-01-22 19:00 ` Jun Sun
@ 2002-01-22 20:03 ` Gerald Champagne
0 siblings, 0 replies; 4+ messages in thread
From: Gerald Champagne @ 2002-01-22 20:03 UTC (permalink / raw)
To: Jun Sun, linux-mips
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-01-22 20:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-21 23:48 ide dma in latest cvs Gerald Champagne
2002-01-22 11:33 ` Vivien Chappelier
2002-01-22 19:00 ` Jun Sun
2002-01-22 20:03 ` Gerald Champagne
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.