[PATCH 05/13] powerpc/5200: LocalPlus driver: fix DMA TX interrupt request

Grant Likely grant.likely at secretlab.ca
Tue Dec 22 18:20:16 EST 2009

On Tue, Dec 22, 2009 at 12:02 AM, Roman Fietze
<roman.fietze at telemotive.de> wrote:
> Signed-off-by: Roman Fietze <roman.fietze at telemotive.de>
> ---
>  arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> diff --git a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c
> index 2fd1f3f..1e4f725 100644
> --- a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c
> +++ b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c
> @@ -460,9 +460,9 @@ mpc52xx_lpbfifo_probe(struct of_device *op, const struct of_device_id *match)
>        if (!lpbfifo.bcom_tx_task)
>                goto err_bcom_tx;
> -       rc = request_irq(bcom_get_task_irq(lpbfifo.bcom_rx_task),
> +       rc = request_irq(bcom_get_task_irq(lpbfifo.bcom_tx_task),
>                         mpc52xx_lpbfifo_bcom_irq, 0,
> -                        "mpc52xx-lpbfifo-rx", &lpbfifo);
> +                        "mpc52xx-lpbfifo-tx", &lpbfifo);

Is this really what you want?  In the TX path, it is the FIFO irq that
indicates the transfer is complete (ie, the DMA fills the FIFO and
finishes before the FIFO has drained).  If both irqs were enabled,
then the DMA irq would fire first, followed by the FIFO irq.  For the
use cases I was dealing with, the next transfer cannot be kicked off
until the FIFO has drained.

In the RX path, the DMA irq indicates that the transfer is complete
(ie, the localbus fills the FIFO and finishes before the DMA drains
the FIFO.

For my use cases, the RX DMA irq was always required, but the TX DMA
irq was never needed.

Does your use case differ?


Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

More information about the Linuxppc-dev mailing list