diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2017-09-07 15:13:18 +0200 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-09-07 15:01:04 -0700 |
commit | 096ea20ed18095a967e1829b6ae60b13453416be (patch) | |
tree | 80d40bbe0cd50766f758299fb9f906257a1127dd /OWNERS | |
parent | 8c9f9ad861a48903aef5bd923741e12aa802c65c (diff) | |
download | chrome-ec-096ea20ed18095a967e1829b6ae60b13453416be.tar.gz |
g: restore DATA PID after USB suspend/resume
In USB FS on a bulk/interrupt endpoint, the transactions normally toggles
between DATA0 and DATA1 PIDs.
After a USB suspend/resume cycle, we need to restart from the PID we
were at before suspend.
In our current code, when going to deep-sleep during USB suspend, we are
re-initializing everything when the MCU restarts at each resume. So we set
implicitly the PID to DATA0. The USB Hardware IP just silently discards the
packet when the PID of an incoming OUT packet is not matching the
expectation in the endpoint register.
In order to preserve DATA PIDS, record the state of the PID toggling on
each endpoint when going to deep-sleep and restore it during the USB
initialization.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=none
BUG=b:38160821
TEST=manual, plug a HG proto2 on a Linux host machine and enable
'auto-suspend' for this USB device. Let it go to sleep and wake-it up by
sending a U2FHID request. Repeat the process several times and see that
the key answers every time (while it was failing after the second cycle
before).
Change-Id: I75e2cfc39f22483d9e9b32c5f8b887dbafc37108
Reviewed-on: https://chromium-review.googlesource.com/655238
Commit-Ready: Marius Schilder <mschilder@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Marius Schilder <mschilder@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Diffstat (limited to 'OWNERS')
0 files changed, 0 insertions, 0 deletions