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

Skip to content
Commit e336888c authored by Jack Pham's avatar Jack Pham
Browse files

usb: xhci: Replace HCD_RH_RUNNING() check in xhci_stop_endpoint



This function can be called to stop an endpoint handled by the
secondary execution environment just after the HCD is removed
(e.g. Type-C cable removal), after which the QMI sound driver
proceeds to unmap transfer ring buffers from DMA. However,
although the RH state indicates it is not running, the controller
may not yet be fully halted and may continue to access now
unmapped memory. Replace the HCD_RH_RUNNING(hcd) check with
xhci_check_args() which includes a check for XHCI_STATE_HALTED,
so that a Stop command can still be issued.

Change-Id: Ie17882cdcfeea13fbdf7b1cd1353296d5966c798
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent 197f1cc9
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