Re: [PATCH] atmel-mci: fix initialization of dma slave data

From: Atsushi Nemoto
Date: Sat Jan 31 2009 - 09:52:47 EST


On Sat, 31 Jan 2009 21:06:51 +0900 (JST), Atsushi Nemoto <anemo@xxxxxxxxxxxxx> wrote:
> > The conversion of atmel-mci to dma_request_channel missed the initialization
> > of the channel dma_slave information. dma_request_channel, along with the
> > filter_fn, find the channel with the proper capabilities, then it is up to the
> > driver to update the dw_dma_chan with its slave data.
> >
> > Reported-by: Atsushi Nemoto <anemo@xxxxxxxxxxxxx>
> > Signed-off-by: Dan Williams <dan.j.williams@xxxxxxxxx>
>
> Thanks. This patch disclose struct dw_dma_chan to its client. But
> the struct seems too private for me. Maybe we need some generic
> method to pass slave information? Any idea or plan?

Also, it seems too late to initialize dwc->dws after returning from
dma_request_channel(). The alloc_chan_resources routine of dw_dmac
driver needs dmc->dws and it is called from dma_request_channel() via
dma_chan_get().

---
Atsushi Nemoto
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/