linux-mips
[Top] [All Lists]

Re: ide dma in latest cvs

To: Gerald Champagne <gerald.champagne@esstech.com>
Subject: Re: ide dma in latest cvs
From: Vivien Chappelier <vivien.chappelier@enst-bretagne.fr>
Date: Tue, 22 Jan 2002 12:33:43 +0100 (CET)
Cc: linux-mips@oss.sgi.com
In-reply-to: <3C4CA8C8.5010801@esstech.com>
Sender: owner-linux-mips@oss.sgi.com
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.


<Prev in Thread] Current Thread [Next in Thread>