lkml.org 
[lkml]   [2008]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: dmaengine.c: question about device_alloc_chan_resources
"Timur Tabi" <timur@freescale.com> wrote:
> On Wed, Sep 17, 2008 at 5:36 PM, Dan Williams <dan.j.williams@intel.com> wrote:
>
> > I believe the problem is that dmatest is telling the core to take
> > multiple references on a channel. Take a look at
> > net/core/dev.c:netdev_dma_event and
> > crypto:asynx_tx/async_tx.c:dma_channel_add_remove both of those check
> > to see if they already have a refence to the channel.
>
> Ok, I see what these functions are doing, and dmatest_add_channel() is
> not doing it. dmatest_add_channel() should not assume that it will
> only receive one and only one DMA_RESOURCE_AVAILABLE for each channel.

Wouldn't it be better if the dmaengine layer made sure it didn't pass
the same channel several times to a client?

I mean, you seem concerned that the memcpy() API should be transparent
and easy to use, but the whole registration interface is just
ridiculously complicated...

> I'll post a patch, if Haavard doesn't do it first. Thanks for looking
> into this and getting back to me. I've spent the entire week
> debugging this.

I'm sorry I didn't respond earlier, but I'm having difficulties
figuring out what's going on during registration/unregistration
myself...

Haavard


\
 
 \ /
  Last update: 2008-09-18 16:33    [W:0.050 / U:1.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site