[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090106.003558.115932572.anemo@mba.ocn.ne.jp>
Date: Tue, 06 Jan 2009 00:35:58 +0900 (JST)
From: Atsushi Nemoto <anemo@....ocn.ne.jp>
To: haavard.skinnemoen@...el.com
Cc: linux-kernel@...r.kernel.org, maciej.sosnowski@...el.com,
dan.j.williams@...el.com
Subject: Re: dw_dmac driver questions
On Mon, 5 Jan 2009 15:30:24 +0100, Haavard Skinnemoen <haavard.skinnemoen@...el.com> wrote:
> > 1. map/unmap DMA buffers for slave transfer
> >
> > For slave-DMA, it seems dmac driver is responsible for mapping DMA
> > buffers, and client is responsible for unmapping them. Is it right?
>
> No, it's the other way around, unless DMA_COMPL_SKIP_*_UNMAP is set.
> But I think the dw_dmac driver wrongly maps the buffers before queuing
> them.
Well, I'm confused... I reference atmel-mci for client and dw_dmac
for dma engine. Currently, dw_dmac calls dma_map_sg() and atmel-mci
calls dma_unmap_sg(). Do you mean atmel-mci will be changed to call
dma_map_sg()?
> > 4. This is a comment on head of dwc_handle_error().
> >
> > /*
> > * The descriptor currently at the head of the active list is
> > * borked. Since we don't have any way to report errors, we'll
> > * just have to scream loudly and try to carry on.
> > */
> >
> > But, the bad descriptor can be at any place of the active list, no ?
> > For example, if the active list contained two descriptor and latter
> > was broken and tasklet was delayed by some reason, the head of the
> > list should be good.
>
> Since dwc_scan_descriptors() was just called, all descriptors that were
> completed successfully have been removed from the active list. So the
> first entry must be the broken one.
But the removal from the active list is done in tasklet too. If the
CPU was slow and DMA engine was fast enough, DMA engine will process
multiple descriptors before the tasklet called, no ?
---
Atsushi Nemoto
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists