Re: [PATCH] musb: fix ISOC Tx programming for CPPI DMAs

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

 



Hello, I wrote:

  You're doing it in musb_host_tx() actually. Although musb_host_rx()
is also broken WRT the isochronous transfers.

doing next packet programming within same urb and *not* starting next

urb. Thus musb_start_urb() doesn't come into this path.

  What? Read the code, please -- musb_start_urb() call should always
precede musb_host_tx() which handles the DMA interrupt. Unless something
clears DMAReqEnab after musb_start_urb() call, setting it only once
should work.

musb_start_urb() call does precede musb_host_tx() but when urb is
*completed*.

I think you are aware that there are multiple packets within same isochronous urb and musb_start_urb() programs only for first packet.

============================================================
        case USB_ENDPOINT_XFER_ISOC:
                qh->iso_idx = 0;
                qh->frame = 0;
                offset = urb->iso_frame_desc[0].offset;
                len = urb->iso_frame_desc[0].length;
============================================================

Sure. What I'm still not aware of is where and how the TXCSR DMA bits are cleared after the first fragment. Hopefully, testing will reveal this...

I really should have stared at the code a bit more myself. Now that I have the sad truth has dawned on me... :-/ My patch "USB: musb: bugfixes for multi-packet TXDMA support" (commit c7bbc056a92476b3b3d70a8df7cc746ac5d56de7) inevitably causes the DMA bits

   You can also refer to this patch'es brokenness in your patch description.
Looks like I now have the complete picture of what happened back then when the patches were (re)submitted. The DaVinci case was competely broken when I recast the patch "USB: musb: fix isochronous TXDMA (take 2)" to fix the failure to transfer the whole ISO URB in DMA mode for the Mentor's own DMA case; before that, DaVinci case could (likewise) complete the URB transfer in PIO mode after transferring the first fragment via DMA...

   So, I now have to ACK your patch (which could use a better description though) and strew my head with ashes. All this also must mean that I have managed to break ISO Tx DMA in the internal tree, where I added the abovementioned patch after the one that fixed it (the order of the patches in the community tree is reverse). I probably did not retest USB audio back then...

No, looks like in the internal tree transfer is completed in PIO mode since the internal version of patch lacks that Mentor DMA fix (luckily :-). Should still check to make sure...

WBR, Sergei

--
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