mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-01 21:02:27 +00:00
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: I6bc9ad01d45e6584a7a14b28806ae4872a22d98f Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/611320 Commit-Ready: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
79ae73477c
commit
8d6da80f34
@@ -2162,8 +2162,7 @@ void pd_task(void *u)
|
||||
}
|
||||
|
||||
/* 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);
|
||||
|
||||
Reference in New Issue
Block a user