• Mathias Nyman's avatar
    xhci: Giveback urb in finish_td directly · 0c03d89d
    Mathias Nyman authored
    mostly refactoring and code cleanup.
    
    while handling transfer events we used to check the return value of
    various functions to see if we can give back the URB.
    Turns out the only case when those return values are set are when
    finish_td() notices we are completing the last td in the URB.
    
    give back the urb directly in finish_td() instead.
    
    Only functional change is that we now increase the event ring dequeue
    pointer in sowtware after giving back the URB. This should not matter
    as we are in hardware interrupt context and the time when writing the
    new event ring dequeue to hardware remains the same.
    Hardware is the only one that can put event TRBs on the event ring.
    Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    0c03d89d
xhci-ring.c 121 KB