lkml.org 
[lkml]   [2008]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC v3 4/7] dmaengine: Add slave DMA interface
    On Feb 15, 2008 2:53 AM, Haavard Skinnemoen
    <hskinnemoen@norway.atmel.com> wrote:
    > On Wed, 13 Feb 2008 20:24:02 +0100
    > Haavard Skinnemoen <hskinnemoen@atmel.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


    \
     
     \ /
      Last update: 2008-02-16 21:09    [W:0.023 / U:65.580 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site