aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/musb_core.h
diff options
context:
space:
mode:
authorBin Liu <b-liu@ti.com>2017-01-03 19:13:46 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-12 05:39:09 -0500
commit5de2dd7f1be18c1ee72c4aa4aeccb191982c1e7c (patch)
tree8c5d1174956a83249f3bf79a799ebe02ed623806 /drivers/usb/musb/musb_core.h
parent84fd8feb5bb50508ba336c7eaf2f377e0b241521 (diff)
usb: musb: core: add clear_ep_rxintr() to musb_platform_ops
commit 6def85a396ce7796bd9f4561c6ae8138833f7a52 upstream. During dma teardown for dequque urb, if musb load is high, musb might generate bogus rx ep interrupt even when the rx fifo is flushed. In such case any of the follow log messages could happen. musb_host_rx 1853: BOGUS RX2 ready, csr 0000, count 0 musb_host_rx 1936: RX3 dma busy, csr 2020 As mentioned in the current inline comment, clearing ep interrupt in the teardown path avoids the bogus interrupt. Clearing ep interrupt is platform dependent, so this patch adds a platform callback to allow glue driver to clear the ep interrupt. This bug seems to be existing since the initial driver for musb support, but I only validated the fix back to v4.1, so only cc stable for v4.1+. Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/musb/musb_core.h')
-rw-r--r--drivers/usb/musb/musb_core.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h
index 91817d77d59c..47331dbdde29 100644
--- a/drivers/usb/musb/musb_core.h
+++ b/drivers/usb/musb/musb_core.h
@@ -216,6 +216,7 @@ struct musb_platform_ops {
216 void (*pre_root_reset_end)(struct musb *musb); 216 void (*pre_root_reset_end)(struct musb *musb);
217 void (*post_root_reset_end)(struct musb *musb); 217 void (*post_root_reset_end)(struct musb *musb);
218 int (*phy_callback)(enum musb_vbus_id_status status); 218 int (*phy_callback)(enum musb_vbus_id_status status);
219 void (*clear_ep_rxintr)(struct musb *musb, int epnum);
219}; 220};
220 221
221/* 222/*
@@ -626,4 +627,10 @@ static inline void musb_platform_post_root_reset_end(struct musb *musb)
626 musb->ops->post_root_reset_end(musb); 627 musb->ops->post_root_reset_end(musb);
627} 628}
628 629
630static inline void musb_platform_clear_ep_rxintr(struct musb *musb, int epnum)
631{
632 if (musb->ops->clear_ep_rxintr)
633 musb->ops->clear_ep_rxintr(musb, epnum);
634}
635
629#endif /* __MUSB_CORE_H__ */ 636#endif /* __MUSB_CORE_H__ */