• Gerd Hoffmann's avatar
    Revert "usb/uas: make sure data urb is gone if we receive status before that" · c621a81e
    Gerd Hoffmann authored
    This reverts commit e4d8318a.
    
    This patch makes uas.c call usb_unlink_urb on data urbs.  The data urbs
    get freed in the completion callback.  This is illegal according to the
    usb_unlink_urb documentation.
    
    This patch also makes the code expect the data completion callback
    being called before the status completion callback.  This isn't
    guaranteed to be the case, even though the actual data transfer should
    be finished by the time the status is received.
    
    Background:  The ehci irq handler for example only know that there are
    finished transfers, it then has go check the QHs & TDs to see which
    transfers did actually finish.  It has no way to figure in which order
    the transfers did complete.  The xhci driver can call the callbacks in
    completion order thanks to the event queue.  This does nicely explain
    why the driver is solid on a (usb2) xhci port whereas it goes crazy on
    ehci in my testing.
    Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
    Cc: stable <stable@vger.kernel.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    c621a81e
uas.c 20.4 KB