diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2015-01-23 10:58:02 -0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-01-24 00:32:33 +0000 |
commit | 6f4af268099881e5b75520c76ac65223453ce1d5 (patch) | |
tree | 943088558ddb766f516341ecc3e2fc0a76bb91c6 /common/pd_log.c | |
parent | c1717516549d16f9230d6e1123c647f2d3c7b62e (diff) | |
download | chrome-ec-6f4af268099881e5b75520c76ac65223453ce1d5.tar.gz |
pd: poll PD events only on Google accessories
Poll USB PD accessories for event log entries only after we have
performed a Discover Identity and identified them as a Google device
(USB VID = 0x18d1) in order to avoid confusing third party devices with
our logging VDM.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=samus
BUG=chrome-os-partner:35858
TEST=connect Zinger to Samus and see the proper PD log entries.
Change-Id: I022fa0d19dc012e46a27b786a724ff251280eeaf
Reviewed-on: https://chromium-review.googlesource.com/242871
Reviewed-by: Todd Broch <tbroch@chromium.org>
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'common/pd_log.c')
-rw-r--r-- | common/pd_log.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/pd_log.c b/common/pd_log.c index 00757690f2..ca66313b9d 100644 --- a/common/pd_log.c +++ b/common/pd_log.c @@ -176,6 +176,9 @@ dequeue_retry: int i, res; incoming_logs = 0; for (i = 0; i < PD_PORT_COUNT; ++i) { + /* only accessories who knows Google logging format */ + if (pd_get_identity_vid(i) != USB_VID_GOOGLE) + continue; res = pd_fetch_acc_log_entry(i); if (res == EC_RES_BUSY) /* host should retry */ return EC_RES_BUSY; |