• Ajay Kumar Gupta's avatar
    USB: musb: NAK timeout scheme on bulk RX endpoint · 1e0320f0
    Ajay Kumar Gupta authored
    Fixes endpoint starvation issue when more than one bulk QH is
    multiplexed on the reserved bulk RX endpoint, which is normal
    for cases like serial and ethernet adapters.
    
    This patch sets the NAK timeout interval for such QHs, and when
    a timeout triggers the next QH will be scheduled.  (This resembles
    the bulk scheduling done in hardware by EHCI, OHCI, and UHCI.)
    
    This scheme doesn't work for devices which are connected to a
    high to full speed tree (transaction translator) as there is
    no NAK timeout interrupt from the musb controller from such
    devices.
    
    Tested with PIO, Inventra DMA, CPPI DMA.
    
    [ dbrownell@users.sourceforge.net:  fold in start_urb() update;
      clarify only for bulk RX; don't accidentally clear WZC bits ]
    Signed-off-by: default avatarAjay Kumar Gupta <ajay.gupta@ti.com>
    Cc: Felipe Balbi <felipe.balbi@nokia.com>
    Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    1e0320f0
musb_host.c 60.1 KB