[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080918162826.3a9d9429@hskinnemo-gx745.norway.atmel.com>
Date: Thu, 18 Sep 2008 16:28:26 +0200
From: Haavard Skinnemoen <haavard.skinnemoen@...el.com>
To: "Timur Tabi" <timur@...escale.com>
Cc: "Dan Williams" <dan.j.williams@...el.com>,
lkml <linux-kernel@...r.kernel.org>
Subject: Re: dmaengine.c: question about device_alloc_chan_resources
"Timur Tabi" <timur@...escale.com> wrote:
> On Wed, Sep 17, 2008 at 5:36 PM, Dan Williams <dan.j.williams@...el.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
--
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