RE: [PATCH 2/2] Add device_prep_dma_interrupt support to fsldma.c

From: Zhang Wei
Date: Tue Mar 11 2008 - 22:29:12 EST


Hi, Dan,

> -----Original Message-----
> From: dan.j.williams@xxxxxxxxx
> > +
> > + /* Set End-of-link to the last link descriptor of
> new list*/
> > + set_ld_eol(fsl_chan, new);
>
> Question, is 'set_ld_eol' safe to call on descriptors that may not be
> the last in the list? For example what about the following sequence:

set_ld_eol() is a safe function, which is only for preparing the tx descriptors
lists. When adding prepared tx descriptior list to DMA channel tx list,
the function append_ld_queue() should be called.

>
> /* prepare two descriptors */
> tx1 = fsl_dma_prep_interrupt(chan);
> tx2 = fsl_dma_prep_memcpy(chan);
>
> /* submit out of order */
> tx2->tx_submit(tx2);
> tx1->tx_submit(tx1);
>
> This is only a concern if you plan to support channel switching at
> some point. For example, switching from a memcpy channel to an xor
> channel.
>
It's no problem. :) In fact, I've added out of order testing codes in fsl_dma_self_test()
function.

But I have a question about device_prep_dma_interrupt(), which is no way to assign
dest and src address. Is it a null tx action dma_async_tx_descriptor except to trigger
an interrupt?

Thanks!
Wei.
--
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/