summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@chromium.org>2018-01-17 09:13:37 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-01-18 10:11:48 -0800
commit0270e9db62247c4b64d07c482b81cfb1fde3b2a2 (patch)
treefcde81280e31d84133d2b463fcc518150bf4b574 /core
parent07230f772e90650eb8dbac444ebe629272306049 (diff)
downloadchrome-ec-0270e9db62247c4b64d07c482b81cfb1fde3b2a2.tar.gz
stm32/usb: Handle spurious wakes in usb_resume
Sometimes, usb_resume gets called, but the D+/D- lines do not indicate an actual resume event (e.g. during ESD discharge). Reference manual tells we should go back to sleep if state is 10 or 11. However, setting FSUSP and LP_MODE in this interrupt routine seems to lock the USB controller (see b/35775088 and b/71688150). Instead, we do it in a deferred routine. The host must assert the reset condition for 20ms, so reading D+/D- after ~3ms should be safe (there is no chance we end up sampling during a bus transaction). BRANCH=none BUG=b:35775088 BUG=b:67766202 BUG=b:71688150 TEST=On staff, with USB autosuspend enabled on soraka, short D+/D- lines, which causes a spurious wake event. After that remote wake-up still works. TEST=Repeat test with ESD discharge. TEST=Repeat test with plugging/unplugging of USB-C monitor. Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Change-Id: I0f2697d1fa5b68356fd8a4fc16eaab5eadad9086 Reviewed-on: https://chromium-review.googlesource.com/868093 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'core')
0 files changed, 0 insertions, 0 deletions