[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e9c3a7c20802161206n6fdece7dk3c442144458ad472@mail.gmail.com>
Date: Sat, 16 Feb 2008 13:06:54 -0700
From: "Dan Williams" <dan.j.williams@...el.com>
To: "Haavard Skinnemoen" <hskinnemoen@...way.atmel.com>
Cc: "Haavard Skinnemoen" <hskinnemoen@...el.com>,
linux-kernel@...r.kernel.org,
"Shannon Nelson" <shannon.nelson@...el.com>,
"David Brownell" <david-b@...bell.net>, kernel@...32linux.org,
"Francis Moreau" <francis.moro@...il.com>,
"Paul Mundt" <lethal@...ux-sh.org>,
"Vladimir A. Barinov" <vbarinov@...mvista.com>,
"Pierre Ossman" <drzeus-list@...eus.cx>
Subject: Re: [RFC v3 4/7] dmaengine: Add slave DMA interface
On Feb 15, 2008 2:53 AM, Haavard Skinnemoen
<hskinnemoen@...way.atmel.com> wrote:
> On Wed, 13 Feb 2008 20:24:02 +0100
> Haavard Skinnemoen <hskinnemoen@...el.com> wrote:
>
> > But looking at your latest patch series, I guess we can use the new
> > "next" field instead. It's not like we really need the full
> > capabilities of list_head.
>
> On second thought, if we do this, we would be using the "next" field in
> an undocumented way. It is currently documented as follows:
>
> * @next: at completion submit this descriptor
>
> But that's not how we're going to use it when doing slave transfers:
> We're using it to keep track of all the descriptors that have already
> been submitted.
>
> I think it would actually be better to go the other way and have the
> async_tx API extend the descriptor as well for its private fields. That
> way, we get the pointer we need, but we can document it differently.
>
> So how about we do something along the lines of the patch below? We
> need to update all the users too of course, but apart from making the
> dma_slave_descriptor struct smaller, I don't think it will change the
> actual memory layout at all.
>
I like the direction of the patch, i.e. splitting out separate
functionality into separate structs. However, I do not want to break
the model of clients sourcing the operations and drivers sinking them
which dma_slave_descriptor appears to do. How about adding a
scatterlist pointer and an 'unmap_type' to the common descriptor?
Where unmap_type selects between, page, single, sg, or no-unmap.
Drivers already know the length and direction.
Regards,
Dan
--
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