diff options
| author | Saket Saurabh <ssaurabh@codeaurora.org> | 2014-02-06 17:21:14 +0530 |
|---|---|---|
| committer | Saket Saurabh <ssaurabh@codeaurora.org> | 2014-02-07 17:11:44 +0530 |
| commit | 81ca96c86fe7e4336a3de99eef27b8c66d6c1669 (patch) | |
| tree | 9821b97ee16b94eb4fd0fb526d6045eec5bbaa63 /scripts/gcc-wrapper.py | |
| parent | ddc46d3a2f31e539b545de4bc4bc00c0a2abc54c (diff) | |
phy_msm_usb: Fix crash when switching from peripheral to host mode
When system boots up, USB driver waits using wait_for_completion()
event for the initial VBUS state notification from PMIC.
Once VBUS initial state is reported to USB after PMIC driver
initialization, USB sets the completion variable pmic_vbus_done
to value 1. Later wait_for_completion() event sets the variable
pmic_vbus_done to value 0.
For USB cable disconnect/connect events, PMIC notifies to USB
through msm_otg_set_vbus_state() and USB queues msm_otg_sm_work()
to process the disconnect/connect events. For the crash scenario,
as the variable pmic_vbus_done value is set to zero, hence USB
returns from msm_otg_set_vbus_state() without queuing the
msm_otg_sm_work() due to which USB disconnect event is not processed
and crash happens when USB switching from peripheral to host mode.
Fixing the issue using a static flag init which will be initialized
to false. Once VBUS initial state is reported to USB after PMIC
driver initialization, set the static flag init to true.
CRs-Fixed: 607067
Change-Id: Id229537f9223a031f68b793725021225e13376a7
Signed-off-by: Saket Saurabh <ssaurabh@codeaurora.org>
Diffstat (limited to 'scripts/gcc-wrapper.py')
0 files changed, 0 insertions, 0 deletions
