RE: [PATCH] MUSB HOST DMA transfers greater than MUSBHSDMA max channel length

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

> Add support for MUSB Host DMA transfers greater than MUSBHSDMA max
> channel length, so that transfers greater than max channel length
> wont be truncated.

    It's "won't". Sorry for the grammar nitpicking... :-)

    thanks, will fix it.. :-)

> Signed-off-by: Anil Shetty <anil@xxxxxx>
> Cc: Felipe Balbi <me@xxxxxxxxxxxxxxx>
> ---
>  drivers/usb/musb/musb_host.c |   10 ++++++++--
>  1 files changed, 8 insertions(+), 2 deletions(-)

> diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
> index 07b1243..dfa8b6d 100644
> --- a/drivers/usb/musb/musb_host.c
> +++ b/drivers/usb/musb/musb_host.c
[...]
> @@ -1278,7 +1279,7 @@ void musb_host_tx(struct musb *musb, u8 epnum)
>                               offset = d->offset;
>                               length = d->length;
>                       }
> -             } else if (dma) {
> +             } else if (dma && (urb->transfer_buffer_length == qh->offset)) {

    Parens around == are not necessary.

    ok

> @@ -1310,7 +1312,11 @@ void musb_host_tx(struct musb *musb, u8 epnum)
>               urb->actual_length = qh->offset;
>               musb_advance_schedule(musb, urb, hw_ep, USB_DIR_OUT);
>               return;
> -     } else  if (usb_pipeisoc(pipe) && dma) {
> +     } else if (transfer_pending && dma) {

    Why not extend the condition instead? You're just duplicating the same code.
And could you keep a tab before *if*?

    will check this out and extend the condition..

> +             if (musb_tx_dma_program(musb->dma_controller, hw_ep, qh, urb,
> +                             offset, length))
> +                     return;
> +     } else if (usb_pipeisoc(pipe) && dma) {
>               if (musb_tx_dma_program(musb->dma_controller, hw_ep, qh, urb,
>                               offset, length)) {
>                       if (is_cppi_enabled() || tusb_dma_omap())

Regards,
Anil
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux