aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBin Liu <b-liu@ti.com>2017-03-10 15:43:35 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-14 05:13:14 -0400
commit0090114d336a9604aa2d90bc83f20f7cd121b76c (patch)
tree8be0ecc372c8792e8a280cf26ff1c5605c942adf
parent3243367b209faed5c320a4e5f9a565ee2a2ba958 (diff)
usb: musb: cppi41: don't check early-TX-interrupt for Isoch transfer
The CPPI 4.1 driver polls register to workaround the premature TX interrupt issue, but it causes audio playback underrun when triggered in Isoch transfers. Isoch doesn't do back-to-back transfers, the TX should be done by the time the next transfer is scheduled. So skip this polling workaround for Isoch transfer. Fixes: a655f481d83d6 ("usb: musb: musb_cppi41: handle pre-mature TX complete interrupt") Cc: <stable@vger.kernel.org> #4.1+ Reported-by: Alexandre Bailon <abailon@baylibre.com> Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Tested-by: Alexandre Bailon <abailon@baylibre.com> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/musb/musb_cppi41.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/drivers/usb/musb/musb_cppi41.c b/drivers/usb/musb/musb_cppi41.c
index 00e272bfee39..355655f8a3fb 100644
--- a/drivers/usb/musb/musb_cppi41.c
+++ b/drivers/usb/musb/musb_cppi41.c
@@ -238,8 +238,27 @@ static void cppi41_dma_callback(void *private_data,
238 transferred < cppi41_channel->packet_sz) 238 transferred < cppi41_channel->packet_sz)
239 cppi41_channel->prog_len = 0; 239 cppi41_channel->prog_len = 0;
240 240
241 if (cppi41_channel->is_tx) 241 if (cppi41_channel->is_tx) {
242 empty = musb_is_tx_fifo_empty(hw_ep); 242 u8 type;
243
244 if (is_host_active(musb))
245 type = hw_ep->out_qh->type;
246 else
247 type = hw_ep->ep_in.type;
248
249 if (type == USB_ENDPOINT_XFER_ISOC)
250 /*
251 * Don't use the early-TX-interrupt workaround below
252 * for Isoch transfter. Since Isoch are periodic
253 * transfer, by the time the next transfer is
254 * scheduled, the current one should be done already.
255 *
256 * This avoids audio playback underrun issue.
257 */
258 empty = true;
259 else
260 empty = musb_is_tx_fifo_empty(hw_ep);
261 }
243 262
244 if (!cppi41_channel->is_tx || empty) { 263 if (!cppi41_channel->is_tx || empty) {
245 cppi41_trans_done(cppi41_channel); 264 cppi41_trans_done(cppi41_channel);