New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 741711 link

Starred by 2 users

Issue metadata

Status: Archived
Owner:
Last visit > 30 days ago
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

ec: debugfs: Log PD state info

Project Member Reported by sha...@chromium.org, Jul 12 2017

Issue description

In several cases across several devices, cros-ec USB-C ports have suddenly stopped speaking PD or stopped working in other mysterious ways until EC reset. Console logging might help to debug this, but older devices don't support the console logging host command, and are sometimes RAM space constrained.

When generating feedback logs, let's log the output of the EC_CMD_USB_PD_CONTROL host command (which includes PD state and some other useful info), and possibly some other useful PD debug info. We'll make the info accessible from cros_ec debugfs, unless someone has a better idea.
 

Comment 1 by sha...@chromium.org, Jul 12 2017

It seems that the console logging host command has existed for a very long time, I was mistaken. Anyway, it would still be useful in some cases to log PD state machine info explicitly.
Project Member

Comment 2 by bugdroid1@chromium.org, Jul 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/dc4c34d13702c2b759646ab481282688e0fb6e16

commit dc4c34d13702c2b759646ab481282688e0fb6e16
Author: Shawn Nematbakhsh <shawnn@chromium.org>
Date: Tue Jul 18 21:26:16 2017

ec_commands: Add define for maximum number of PD ports

It's helpful for the host to know the maximum number of PD ports that
can possibly exist in a cros-ec device.

BUG= chromium:741711 
BRANCH=None
TEST=`make buildall -j`

Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Change-Id: Ic8a9eb22dc0bf51c8f5e1dfe380ca8f187481070
Reviewed-on: https://chromium-review.googlesource.com/576138
Commit-Ready: Shawn N <shawnn@chromium.org>
Tested-by: Shawn N <shawnn@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>

[modify] https://crrev.com/dc4c34d13702c2b759646ab481282688e0fb6e16/include/ec_commands.h
[modify] https://crrev.com/dc4c34d13702c2b759646ab481282688e0fb6e16/common/usb_pd_protocol.c

Project Member

Comment 3 by bugdroid1@chromium.org, Jul 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/6a23fc7244025b2c079f583282759195bdeb13ad

commit 6a23fc7244025b2c079f583282759195bdeb13ad
Author: Shawn Nematbakhsh <shawnn@chromium.org>
Date: Tue Jul 18 21:26:16 2017

ec_commands: Fix more portability issues

BUG= chromium:741711 
BRANCH=None
TEST=`make buildall -j`, also verify kevin kernel builds with new copy
of ec_commands.h.

Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Change-Id: Ia7fab98d61ecac727a0007d6f59ab4c9047de049
Reviewed-on: https://chromium-review.googlesource.com/576231
Commit-Ready: Shawn N <shawnn@chromium.org>
Tested-by: Shawn N <shawnn@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>

[modify] https://crrev.com/6a23fc7244025b2c079f583282759195bdeb13ad/include/ec_commands.h

Project Member

Comment 4 by bugdroid1@chromium.org, Jul 18 2017

Labels: merge-merged-chromeos-4.4
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/af9108fe6d9ec9c314dc683e5474c27b88077d05

commit af9108fe6d9ec9c314dc683e5474c27b88077d05
Author: Shawn Nematbakhsh <shawnn@chromium.org>
Date: Tue Jul 18 23:46:29 2017

CHROMIUM: mfd: cros_ec: Add PD port info to debugfs

Add info useful for debugging USB-PD port state.

BUG= chromium:741711 
TEST=On kevin, run `cat /sys/kernel/debug/cros_ec/pdinfo`. Verify that
state + port info is displayed and info changes when port state changes.

Change-Id: Id58f281930640618a954512f95b636ce161e338f
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/569102
Commit-Ready: Shawn N <shawnn@chromium.org>
Tested-by: Shawn N <shawnn@chromium.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>

[modify] https://crrev.com/af9108fe6d9ec9c314dc683e5474c27b88077d05/drivers/platform/chrome/cros_ec_debugfs.c
[modify] https://crrev.com/af9108fe6d9ec9c314dc683e5474c27b88077d05/drivers/power/cros_usbpd-charger.c

Project Member

Comment 5 by bugdroid1@chromium.org, Jul 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/a21eb8ec76781b0ccac979b0f64451ca7dcbc004

commit a21eb8ec76781b0ccac979b0f64451ca7dcbc004
Author: Shawn Nematbakhsh <shawnn@chromium.org>
Date: Tue Jul 18 23:46:27 2017

CHROMIUM: cros-ec: Update cros_ec_commands header to latest version

BUG= chromium:741711 
TEST=`emerge-kevin chromeos-kernel-4_4`

Change-Id: I465ea51fa2440f351654771bf0a17f80b6996070
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/576235
Commit-Ready: Shawn N <shawnn@chromium.org>
Tested-by: Shawn N <shawnn@chromium.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/a21eb8ec76781b0ccac979b0f64451ca7dcbc004/include/linux/mfd/cros_ec_commands.h

Project Member

Comment 6 by bugdroid1@chromium.org, Jul 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/6081373b2d7f3ed47b5b6ee787a2d70afb3c60f9

commit 6081373b2d7f3ed47b5b6ee787a2d70afb3c60f9
Author: Shawn Nematbakhsh <shawnn@chromium.org>
Date: Fri Jul 28 02:56:25 2017

debugd: log_tool: Add cros_ec_pdinfo to feedback reports

Log state of cros-ec USB-C ports. debugfs entry created in CL:569102.

BUG= chromium:741711 
TEST=File feedback on kevin, verify that cros_ec_pdinfo entry appears in
log with proper port states.

Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Change-Id: If930c2459257a7fdef102dc78fe4c06e7609c677
Reviewed-on: https://chromium-review.googlesource.com/570191
Commit-Ready: Shawn N <shawnn@chromium.org>
Tested-by: Shawn N <shawnn@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>

[modify] https://crrev.com/6081373b2d7f3ed47b5b6ee787a2d70afb3c60f9/debugd/src/log_tool.cc

Comment 7 by sha...@chromium.org, Jul 28 2017

Status: Fixed (was: Untriaged)

Comment 8 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Sign in to add a comment