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:
Jack Pham <jackp@codeaurora.org>
Loading
Please register or sign in to comment