summaryrefslogtreecommitdiff
path: root/drivers/usb/musb/musb_cppi41.c
diff options
context:
space:
mode:
authorJames Morris <james.l.morris@oracle.com>2017-03-28 11:03:35 +1100
committerJames Morris <james.l.morris@oracle.com>2017-03-28 11:03:35 +1100
commit840c91dc6a13b160f5b6e5c79c430dffac11c945 (patch)
tree5309824f4531b2611a575e7971a935d2e95feb02 /drivers/usb/musb/musb_cppi41.c
parent3dfc9b02864b19f4dab376f14479ee4ad1de6c9e (diff)
parentc02ed2e75ef4c74e41e421acb4ef1494671585e8 (diff)
downloadlinux-840c91dc6a13b160f5b6e5c79c430dffac11c945.tar.gz
update to v4.11-rc4 due to memory corruption bug in rc2
Diffstat (limited to 'drivers/usb/musb/musb_cppi41.c')
-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,
transferred < cppi41_channel->packet_sz)
cppi41_channel->prog_len = 0;
- if (cppi41_channel->is_tx)
- empty = musb_is_tx_fifo_empty(hw_ep);
+ if (cppi41_channel->is_tx) {
+ u8 type;
+
+ if (is_host_active(musb))
+ type = hw_ep->out_qh->type;
+ else
+ type = hw_ep->ep_in.type;
+
+ if (type == USB_ENDPOINT_XFER_ISOC)
+ /*
+ * Don't use the early-TX-interrupt workaround below
+ * for Isoch transfter. Since Isoch are periodic
+ * transfer, by the time the next transfer is
+ * scheduled, the current one should be done already.
+ *
+ * This avoids audio playback underrun issue.
+ */
+ empty = true;
+ else
+ empty = musb_is_tx_fifo_empty(hw_ep);
+ }
if (!cppi41_channel->is_tx || empty) {
cppi41_trans_done(cppi41_channel);