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

Skip to content
Commit c02df9c3 authored by Saket Saurabh's avatar Saket Saurabh
Browse files

usb:phy-msm-usb: Fix unclocked access during host bus suspend



As part of USB entering low power mode, core irq is disabled. Any
interrupt coming at this point will be pending and would be triggered
once core irq is enabled. When USB is in LPM and if core irq comes,then
udc interrupt handler will be called where it will try to access UDC
controller regiter leading to unclocked access.
Fix this issue by not accessing the register in UDC IRQ when peripheral
mode is not active. The host driver already take care of this by not
accessing any EHCI register when root hub is suspended.

Also there is possibility that for fast usb connect/disconnect in host
mode, msm_otg_suspend might return EBUSY. This results in runtime PM
usage counter becoming negative and USB fails to enter LPM. Fix this
LPM issue by checking if A_BUS_REQ flag is set while processing
msm_otg_suspend(), then mark pm_done flag to true. Later, in the
msm_otg_sm_work() based on pm_done flag, pm_runtime_get_sync() is called
which finally helps in maintaining correct runtime PM usage counters and
device can enter LPM.

CRs-Fixed: 708326
Change-Id: I744a5e3c45005fb13511b5c19fd7e02a76bde4e5
Signed-off-by: default avatarSaket Saurabh <ssaurabh@codeaurora.org>
parent 6399cfab
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