Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 6c0b3a62 authored by Jack Pham's avatar Jack Pham Committed by Mayank Rana
Browse files

usb: xhci: clean up command queue when halting



Calling usb_remove_hcd() on both of the xHCI HCDs may race with
hub_event() which executes on its own workqueue. When xhci_halt()
is called and stops the command ring, the hub thread may have
already issued a command such as xhci_configure_endpoint() and
is currently waiting for the command to complete while holding
the device lock. Meanwhile since the controller is already halted,
no events are expected to complete and the command timer will
continually timeout every 5 seconds and re-arm itself. Since the
completion for the command is never issued, the threads are
essentially deadlocked.

Avoid this situation when halting the controller by forcing the
command queue to be cleaned up.

Change-Id: I88150e3435b5f06e37e9881dddaeff4807c24cc9
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
parent 79d42bd7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment