TCPC read error handling permafails |
||||
Issue descriptionOn repetitive read failures, the TCPCI and ANX74xx drivers will eventually disable the TCPC entirely. Since nothing will re-enable this port, that USB-C port is effectively disabled until the next EC reset. Automatically resume the port after a short interval in order to allow for the possibility of recovery. The user will see that their device fails to work, and should unplug it eventually.
,
Oct 3
v1.5 Analogix TCPC firmware contained a bug in SOP' message handling that triggered this behavior.
,
Oct 5
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/31fe290061fdf9d1b0e8a634c77cb7a30b2f012b commit 31fe290061fdf9d1b0e8a634c77cb7a30b2f012b Author: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Date: Fri Oct 05 00:09:01 2018 tcpc: Resume suspended ports after an interval When it appears that the TCPC queue handling logic may be stuck in an infinite loop, the EC will break the loop by disabling the port in order to avoid task starvation. However, nothing attempts to resume the port, and it therefore remains disabled until the next EC reset. Wake back up after a reasonable interval in order to automatically retry. On port suspend, completely drain the TCPM message queue. BUG= chromium:891713 TEST=On Careena hardware, with analogix TCPC firmware v1.5 and an electronically marked cable that sends SOP' messages, verify that the EC auto-retries every second. After removing the offending cable, and PD power supply will work. BRANCH=grunt Change-Id: I563b763501333eb36ee1f76e6f484ebb3245c82a Signed-off-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1258571 Reviewed-by: Jett Rink <jettrink@chromium.org> [modify] https://crrev.com/31fe290061fdf9d1b0e8a634c77cb7a30b2f012b/driver/tcpm/stub.c [modify] https://crrev.com/31fe290061fdf9d1b0e8a634c77cb7a30b2f012b/driver/tcpm/tcpm.h [modify] https://crrev.com/31fe290061fdf9d1b0e8a634c77cb7a30b2f012b/include/usb_pd.h [modify] https://crrev.com/31fe290061fdf9d1b0e8a634c77cb7a30b2f012b/common/usb_pd_protocol.c [modify] https://crrev.com/31fe290061fdf9d1b0e8a634c77cb7a30b2f012b/include/usb_pd_tcpc.h [modify] https://crrev.com/31fe290061fdf9d1b0e8a634c77cb7a30b2f012b/common/usb_pd_tcpc.c [modify] https://crrev.com/31fe290061fdf9d1b0e8a634c77cb7a30b2f012b/driver/tcpm/anx74xx.c [modify] https://crrev.com/31fe290061fdf9d1b0e8a634c77cb7a30b2f012b/driver/tcpm/tcpci.c
,
Oct 5
,
Oct 7
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/42cc4c7e09ee8b571aec5a1b23ac95f3bd3bb7e3 commit 42cc4c7e09ee8b571aec5a1b23ac95f3bd3bb7e3 Author: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Date: Sun Oct 07 20:33:02 2018 tcpc: Resume suspended ports after an interval When it appears that the TCPC queue handling logic may be stuck in an infinite loop, the EC will break the loop by disabling the port in order to avoid task starvation. However, nothing attempts to resume the port, and it therefore remains disabled until the next EC reset. Wake back up after a reasonable interval in order to automatically retry. On port suspend, completely drain the TCPM message queue. BUG= chromium:891713 TEST=On Careena hardware, with analogix TCPC firmware v1.5 and an electronically marked cable that sends SOP' messages, verify that the EC auto-retries every second. After removing the offending cable, and PD power supply will work. BRANCH=grunt Change-Id: I563b763501333eb36ee1f76e6f484ebb3245c82a Signed-off-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1258571 Reviewed-by: Jett Rink <jettrink@chromium.org> (cherry picked from commit 31fe290061fdf9d1b0e8a634c77cb7a30b2f012b) Reviewed-on: https://chromium-review.googlesource.com/c/1267220 Reviewed-by: Martin Roth <martinroth@chromium.org> Tested-by: Martin Roth <martinroth@chromium.org> [modify] https://crrev.com/42cc4c7e09ee8b571aec5a1b23ac95f3bd3bb7e3/driver/tcpm/stub.c [modify] https://crrev.com/42cc4c7e09ee8b571aec5a1b23ac95f3bd3bb7e3/driver/tcpm/tcpm.h [modify] https://crrev.com/42cc4c7e09ee8b571aec5a1b23ac95f3bd3bb7e3/include/usb_pd.h [modify] https://crrev.com/42cc4c7e09ee8b571aec5a1b23ac95f3bd3bb7e3/common/usb_pd_protocol.c [modify] https://crrev.com/42cc4c7e09ee8b571aec5a1b23ac95f3bd3bb7e3/include/usb_pd_tcpc.h [modify] https://crrev.com/42cc4c7e09ee8b571aec5a1b23ac95f3bd3bb7e3/common/usb_pd_tcpc.c [modify] https://crrev.com/42cc4c7e09ee8b571aec5a1b23ac95f3bd3bb7e3/driver/tcpm/anx74xx.c [modify] https://crrev.com/42cc4c7e09ee8b571aec5a1b23ac95f3bd3bb7e3/driver/tcpm/tcpci.c
,
Oct 17
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/0847b33623e237c45141738c2be3f4f0851cbf2c commit 0847b33623e237c45141738c2be3f4f0851cbf2c Author: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Date: Wed Oct 17 22:39:04 2018 tcpc: Resume suspended ports after an interval When it appears that the TCPC queue handling logic may be stuck in an infinite loop, the EC will break the loop by disabling the port in order to avoid task starvation. However, nothing attempts to resume the port, and it therefore remains disabled until the next EC reset. Wake back up after a reasonable interval in order to automatically retry. On port suspend, completely drain the TCPM message queue. BUG= chromium:891713 TEST=On Careena hardware, with analogix TCPC firmware v1.5 and an electronically marked cable that sends SOP' messages, verify that the EC auto-retries every second. After removing the offending cable, and PD power supply will work. BRANCH=grunt Change-Id: I563b763501333eb36ee1f76e6f484ebb3245c82a Signed-off-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1258571 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/1286296 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> [modify] https://crrev.com/0847b33623e237c45141738c2be3f4f0851cbf2c/driver/tcpm/stub.c [modify] https://crrev.com/0847b33623e237c45141738c2be3f4f0851cbf2c/driver/tcpm/tcpm.h [modify] https://crrev.com/0847b33623e237c45141738c2be3f4f0851cbf2c/include/usb_pd.h [modify] https://crrev.com/0847b33623e237c45141738c2be3f4f0851cbf2c/common/usb_pd_protocol.c [modify] https://crrev.com/0847b33623e237c45141738c2be3f4f0851cbf2c/include/usb_pd_tcpc.h [modify] https://crrev.com/0847b33623e237c45141738c2be3f4f0851cbf2c/common/usb_pd_tcpc.c [modify] https://crrev.com/0847b33623e237c45141738c2be3f4f0851cbf2c/driver/tcpm/anx74xx.c [modify] https://crrev.com/0847b33623e237c45141738c2be3f4f0851cbf2c/driver/tcpm/tcpci.c |
||||
►
Sign in to add a comment |
||||
Comment 1 by jbrandmeyer@chromium.org
, Oct 3