• Arvid Brodin's avatar
    usb/isp1760: Use polling instead of SOF interrupts to fix Errata 2 · 6d50c60e
    Arvid Brodin authored
    Errata 2 for the isp1760 explains that the chip sometimes does not issue
    interrupts when an ATL (bulk or control) transfer is completed. There are
    several issues with the current work-around (SOF interrupts) for this:
    
    1) It seems the chip sometimes does not even set the done bit for a
       completed transfer, in which case SOF interrupts does not solve
       the problem since we still check the done map to find out which
       transfer descriptors to handle.
    
    2) The above point seems to happen only when ATL and SOF interrupts
       are enabled at the same time. However, disabling ATL interrupts
       increases the latency between transfer completion and handling.
       This is very noticeable in the testusb suite, which take several
       minutes more to run with ATL interrupts disabled.
    
    This patch removes the code to switch on SOF interrupts, and instead
    use a kernel timer to periodically check for "old" descriptors that
    have their VALID and ACTIVE flags unset, indicating completion, thus
    avoiding the dependency on the chip's done map (and SOF interrupts)
    to find transfers affected by this HW bug.
    
    [bigeasy@linutronix: 80 lines limit]
    Signed-off-by: default avatarArvid Brodin <arvid.brodin@enea.com>
    Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    6d50c60e
isp1760-hcd.h 5.75 KB