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

Issue 606107 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: May 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Bogus errors about usbpd_ec3po_interp_connect on samus

Reported by jrbarnette@chromium.org, Apr 23 2016

Issue description

Recent examination of servod logs on a servo V3 for samus
turned up messages like the following:
    2016-04-22 22:17:41,725 - Servod - INFO - Initialized ec_ec3po_interp_connect to on
    2016-04-22 22:17:41,732 - Servod - ERROR - Getting usbpd_ec3po_interp_connect: 'NoneType' object has no attribute 'get_interp_connect'
    2016-04-22 22:17:41,734 - Servod - ERROR - Problem initializing usbpd_ec3po_interp_connect -> on :: 'NoneType' object has no attribute 'get_interp_connect'
    2016-04-22 22:17:41,735 - Servod - INFO - Initialized usbpd_ec3po_interp_connect to on
    2016-04-22 22:17:41,737 - servod - INFO - Listening on 0.0.0.0 port 9999

Messages like this are rude, and should be squelched to avoid
red herrings in debug, witness  bug 606062 .
 
Cc: waihong@chromium.org tbroch@chromium.org
Yeah, this is an artifact of the set/get servo methods and the messy way that interfaces are defined for servo boards. The usbpd UART is defined in the usbpd.xml overlay file which is included by both servo v2 and servo v3. But, servo v3 couldn't actually serve that 

Because servo v3 didn't support a UART for the PD MCU, I decided to initialize that interface as a NoneType object. Maybe if we had some sort of exceptions for servo hosts.

Needs more thought.

Comment 2 by tbroch@chromium.org, Apr 26 2016

Would it be fair to see interface == None as an indicator that the particular control (usbpd_ec3po_interp_connect in this case) can't be supported and print a meaningful warning instead?


Yeah, that's kind of the assumption that I was making, so that seems fair. For what it's worth, I think I'm the first one to bring about this "None" type of interface. Printing a warning instead of an error seems better going forward.
Status: Started (was: Assigned)
Project Member

Comment 5 by bugdroid1@chromium.org, May 28 2016

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

commit a849d46854af94751ef215878679903dab453cc5
Author: Aseda Aboagye <aaboagye@google.com>
Date: Thu May 05 00:08:16 2016

servo: ec3po: Prevent err msgs for bad interfaces.

When starting up servod on servo v3 for boards with PD MCUs, there would
be some error messages complaining about the ability to get the value of
the usbpd_ec3po_interp_connect control.  This is because servo v3 does
not have support for the PD MCU UART and therefore, initialization of
the EC-3PO console was simply returning None.  This was causing
attribute errors when trying to get and set EC3PO related controls for
that particular interface.  These errors also caused some red herrings
in debug (see  crbug.com/60682 ).

This commit changes the ec3po driver to ignore invalid interfaces (that is
None) so that no error messages are produced during init.

BUG= chromium:606107 
BRANCH=None
TEST=cros_workon start hdctools --board beaglebone_servo; Build and run
an image for servo v3. servod -b samus; Verify that no error messages
are shown.

Change-Id: I6fb994b3c451ccdd896fcd539102e6e4ebab71b2
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/342467
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>

[modify] https://crrev.com/a849d46854af94751ef215878679903dab453cc5/servo/servo_server.py
[modify] https://crrev.com/a849d46854af94751ef215878679903dab453cc5/servo/drv/ec3po_driver.py

Status: Fixed (was: Started)
Verified locally in CL, but needs verification when the next beaglebone_servo image is rolled out to the lab.
Labels: VerifyIn-53
Status: Verified (was: Fixed)
Verified in servod 0.0.1-9071ed9 by inspecting debug logs on a random samus run.

--
https://wmatrix.googleplex.com/testrun/unfiltered?test_ids=322790121

Sign in to add a comment