summaryrefslogtreecommitdiff
path: root/test/usb_pd_int.mocklist
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2019-11-19 09:50:46 -0700
committerCommit Bot <commit-bot@chromium.org>2019-11-22 20:23:52 +0000
commit044f15584125158c867f581004551b7d4e82b9ac (patch)
tree542ee6f18e96846283fcf0ccd69470547d24864b /test/usb_pd_int.mocklist
parent33991367ca56493c68dc2fd6937d7858a39d2811 (diff)
downloadchrome-ec-044f15584125158c867f581004551b7d4e82b9ac.tar.gz
usbc: fix storm tracker overflow issue
If there is no USB-C interrupt activity for 2^31 microseconds, then there are more than ALERT_STORM_MAX_COUNT events within 2^31 microsecond (instead of ALERT_STORM_INTERVAL), then the interrupt storm would incorrectly detect a storm and disable the port due to incorrect math regarding 32-bit overflow. BRANCH=octopus and all branches with original storm detection (CL:1650484) BUG=b:144369187 TEST=unit test in CL Change-Id: I90b888ac092f81d151538d6018771fb32f8e9c39 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1925668 Commit-Queue: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'test/usb_pd_int.mocklist')
-rw-r--r--test/usb_pd_int.mocklist8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/usb_pd_int.mocklist b/test/usb_pd_int.mocklist
new file mode 100644
index 0000000000..71c2e2cee9
--- /dev/null
+++ b/test/usb_pd_int.mocklist
@@ -0,0 +1,8 @@
+/* Copyright 2019 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+ #define CONFIG_TEST_MOCK_LIST \
+ MOCK(USB_MUX) \
+ MOCK(TCPC)