• Bin Liu's avatar
    usb: musb: core: add clear_ep_rxintr() to musb_platform_ops · 088f5497
    Bin Liu authored
    [ Upstream commit 6def85a3 ]
    
    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+.
    
    cc: stable@vger.kernel.org # 4.1+
    Signed-off-by: default avatarBin Liu <b-liu@ti.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
    088f5497
musb_core.h 15.5 KB