diff options
author | Aseda Aboagye <aaboagye@google.com> | 2017-08-10 15:11:00 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2017-08-14 22:31:14 +0000 |
commit | 73f55b8cdcc32121080692e47711121ceaa05a63 (patch) | |
tree | 5da2995e936c9c42add9f1778a814291dd1b359b | |
parent | 11c265c5e06be301f67bbe30ea57ae3176969d38 (diff) | |
download | chrome-ec-73f55b8cdcc32121080692e47711121ceaa05a63.tar.gz |
usb_pd_protocol: Req SNK Cap if not received yet.
In the SRC_READY state, we'll only request sink caps if we haven't
received them yet and only if its the first transition to the state.
However, we also don't send any PD traffic in that state if there's an
incoming message in order to prevent a collision. This could create a
scenario where upon entry to the SRC_READY state, a message is incoming.
When this occurs, we never request the sink caps.
This commit simply removes the condition that we may only request sink
caps on the first transition to the SRC_READY state.
BUG=b:64037926
BRANCH=gru
TEST=Flash kevin; Connect to a DR port partner; Verify that sink caps
are requested even after the first transition to the SRC_READY state.
Change-Id: Ie5f62df548b6e90930c6b3cbb18a786fb063c10e
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Original-Change-Id: I6bc9ad01d45e6584a7a14b28806ae4872a22d98f
Original-signed-off-by: Aseda Aboagye <aaboagye@google.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/611320
Original-Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Original-tested-by: Aseda Aboagye <aaboagye@chromium.org>
Original-reviewed-by: Shawn N <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/614652
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
-rw-r--r-- | common/usb_pd_protocol.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c index 0b4ebadfce..6ac27bbf85 100644 --- a/common/usb_pd_protocol.c +++ b/common/usb_pd_protocol.c @@ -1941,8 +1941,7 @@ void pd_task(void) } /* Send get sink cap if haven't received it yet */ - if (pd[port].last_state != pd[port].task_state && - !(pd[port].flags & PD_FLAGS_SNK_CAP_RECVD)) { + if (!(pd[port].flags & PD_FLAGS_SNK_CAP_RECVD)) { if (++snk_cap_count <= PD_SNK_CAP_RETRIES) { /* Get sink cap to know if dual-role device */ send_control(port, PD_CTRL_GET_SINK_CAP); |