• Bin Liu's avatar
    usb: core: unlink urbs from the tail of the endpoint's urb_list · 2eac1362
    Bin Liu authored
    While unlink an urb, if the urb has been programmed in the controller,
    the controller driver might do some hw related actions to tear down the
    urb.
    
    Currently usb_hcd_flush_endpoint() passes each urb from the head of the
    endpoint's urb_list to the controller driver, which could make the
    controller driver think each urb has been programmed and take the
    unnecessary actions for each urb.
    
    This patch changes the behavior in usb_hcd_flush_endpoint() to pass the
    urbs from the tail of the list, to avoid any unnecessary actions in an
    controller driver.
    
    Cc: stable@vger.kernel.org # v4.4+
    Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
    Signed-off-by: default avatarBin Liu <b-liu@ti.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    2eac1362
hcd.c 88.1 KB