usb: xhci: Avoid calling wakeup_enable without set_wakeup_capable
Commit 6076cdc3 ("usb: host: Disable system wakeup if remote wakeup is not required")has introduced a check in xhci_plat_probe where if device_may_wakeup is set for the parent device, then device_wakeup_enable is called on xhci-plat, but calling device_wakeup_enable without device_set_wakeup_capable is useless. Now when xhci_plat_suspend is called the xhci_suspend will check for device_may_wakeup and here the result will be FALSE. In xhci suspend the do_wakeup is checked, if FALSE then it will try to call xhci_disable_port_wake_on_bits where it will try to do a readl operation. This will lead the core to hang since xhci is already suspended and we tried to do a readl. Fix this by replacing device_wakeup_enable with device_init_wakeup. This will set the do_wakeup to be true and therefore avoid calling xhci_disable_port_wake_on_bits and bail out when checked for HCD_HW_ACCESSIBLE. Change-Id: Id3fad841ebe07b777dc229ced36364ad31e6d81d Signed-off-by:Udipto Goswami <ugoswami@codeaurora.org>
Loading
Please register or sign in to comment