diff options
author | Diana Z <dzigterman@chromium.org> | 2020-03-28 22:31:14 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-04-07 01:22:02 +0000 |
commit | ec865fc4873ddea4ace3d948aa9fab088913a70d (patch) | |
tree | cc96ae1a15a064a143d5fedd8fc131f744b7436a /common/usb_pd_policy.c | |
parent | 2e268611ee4a42d202492df59584c5b08567ad22 (diff) | |
download | chrome-ec-ec865fc4873ddea4ace3d948aa9fab088913a70d.tar.gz |
PD: Move pd_discovery init out of dfp_consume_identity
Moves initialization of pd_discovery from dfp_consume_identity in order
to support folding the cable identity into the pd_discovery structure
(the cable discovery may or may not precede partner discovery).
Also removes a cable structure reset which would clear the cable during
a power role swap, and unnecessary references to the TCPMv1 message ID
trackers which are a part of the PRL in TCPMv2.
BRANCH=None
BUG=b:152417977
TEST=on kindred with TCPMv2, ensure discovery information is cleared
when unpluggging discovered partner and inserting one with no discover
identity response
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I646b3796704fb6980c64d1b9c60327abee19e371
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2130474
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Diffstat (limited to 'common/usb_pd_policy.c')
-rw-r--r-- | common/usb_pd_policy.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/common/usb_pd_policy.c b/common/usb_pd_policy.c index 8164e4bf0d..8d371d4b44 100644 --- a/common/usb_pd_policy.c +++ b/common/usb_pd_policy.c @@ -861,6 +861,7 @@ int pd_svdm(int port, int cnt, uint32_t *payload, uint32_t **rpayload, /* Received a SOP Discover Ident Message */ } else if (IS_ENABLED(CONFIG_USB_PD_DECODE_SOP) && board_is_tbt_usb4_port(port)) { + pd_dfp_discovery_init(port); dfp_consume_identity(port, cnt, payload); /* Enable USB4 mode if USB4 VDO present @@ -886,6 +887,7 @@ int pd_svdm(int port, int cnt, uint32_t *payload, uint32_t **rpayload, rsize = dfp_discover_svids(payload); } } else { + pd_dfp_discovery_init(port); dfp_consume_identity(port, cnt, payload); rsize = dfp_discover_svids(payload); } |