• D
    USB: ehci: qh_completions cleanup and bugfix · 4f667627
    David Brownell 提交于
    Simplify processing of completed qtds, and correct handling of short
    reads, by removing two state variables:
    
     - "qtd_status" wasn't needed.  The current URB's status is either
       OK (-EINPROGRESS) or some fault status.  Once a fault appears,
       the queue halts and any later QTDs are immediately removed, so
       no temporary status is needed.  (Or for typical short reads,
       it's not treated as a fault, so no queue halt is needed.)
    
     - "do_status" was erroneous.  Because of how the queue is set up,
       short control reads can (and should!) be treated like full size
       reads, and cleaned up the usual way.  The status stage will be
       executed transparently, and usbcore handles the choice of whether
       to report this status as unexected.
     
    The "do_status" problem caused a rather perplexing timing-dependent
    problem with usbtest case 10.  Sometimes it would make the controller
    skip a dozen transactions while (wrongly) trying to clean up after a
    short transfer.  Fortunately, removing a dcache contention issue made
    this become trivial to reproduce (on one test rig), so enough clues
    finally presented themselves ... I think this has been around for a
    very long time, but was worsened by recent urb->status changes.
    Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
    Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
    4f667627
ehci-q.c 32.4 KB