New issue
Advanced search Search tips

Issue 764046 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Task



Sign in to add a comment

cr50: reduce noise in logs

Project Member Reported by apronin@chromium.org, Sep 11 2017

Issue description

1) Currently there is a number of debug messages that are reported at a higher-than-deserved level in system logs due to their usefulness in addressing cr50 i2c issues:
 a) https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/448671
 b) dev_warn(dev, "i2c transfer failed (attempt %d/%d): %d\n" in https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/457786

People who look for clues in logs often stumble upon these lines and spend time chasing the wrong path.
We don't need to keep these messages above debug level now.
TODO:
 a) Revert chromium:448671
 b) Reduce dev_warn to dev_dbg in chromium:457786 (except for the last try).

2) We also have errors about enabling/disabling deep-sleep due to the tpm driver sending control-deep-sleep commands and cr50 not implementing them. Introduced in https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/427372/9/drivers/char/tpm/cr50.c#56

There may be still a reason to keep those commands around for arm boards, but currently they are not used even there.

TODO: check the returned error code and lower the reporting level to dev_dbg in case of "not implemented" error.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Sep 12 2017

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

commit 4d607e833983d5960a5b8de31cdbd788e6b4abd8
Author: Guenter Roeck <groeck@chromium.org>
Date: Tue Sep 12 17:30:24 2017

CHROMIUM: tpm: cr50_i2c: Do not warn on first transfer failure

cr50's i2c transfers fail all the time, clogging the kernel log with

[255631.827084] tpm tpm0: i2c transfer failed (attempt 1/3): -121

Only log the transfer error on subsequent attempts to reduce the noise.

BUG=chromium:764046
TEST=Load system and observe lack of logging noise

Change-Id: I383961c6cf0437b06f87e53ed70390fcfa2f90d2
Signed-off-by: Guenter Roeck <groeck@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/660692
Reviewed-by: Andrey Pronin <apronin@chromium.org>

[modify] https://crrev.com/4d607e833983d5960a5b8de31cdbd788e6b4abd8/drivers/char/tpm/cr50_i2c.c

Project Member

Comment 2 by bugdroid1@chromium.org, Mar 6 2018

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

commit e18811d26ec663c2b9c608ec880dddb69bcb06a5
Author: Andrey Pronin <apronin@chromium.org>
Date: Tue Mar 06 02:34:32 2018

CHROMIUM: tpm: Don't send control-deep-sleep for cr50

Cr50 currently ignores requests to enable/disable deep-sleep by sending
a vendor-specific command. Stop sending those commands from cr50
drivers.

BUG= chromium:818749 
BUG=chromium:764046
TEST=Go through suspend-to-memory and resume, check system log for
     messages like "tpm tpm0: A TPM error (1407) occurred disabling
     deep-sleep". No messages after applying the patch.

Change-Id: I731b89bac39324f63f069eceee32d30a5062ae2c
Signed-off-by: Andrey Pronin <apronin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/949456
Reviewed-by: Duncan Laurie <dlaurie@google.com>

[modify] https://crrev.com/e18811d26ec663c2b9c608ec880dddb69bcb06a5/drivers/char/tpm/cr50_spi.c
[modify] https://crrev.com/e18811d26ec663c2b9c608ec880dddb69bcb06a5/drivers/char/tpm/cr50_i2c.c
[modify] https://crrev.com/e18811d26ec663c2b9c608ec880dddb69bcb06a5/drivers/char/tpm/cr50.c
[modify] https://crrev.com/e18811d26ec663c2b9c608ec880dddb69bcb06a5/drivers/char/tpm/cr50.h

Project Member

Comment 3 by bugdroid1@chromium.org, Mar 7 2018

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

commit e302a79212f507a1db4f097b69bea314579a67d4
Author: Andrey Pronin <apronin@chromium.org>
Date: Wed Mar 07 06:38:04 2018

CHROMIUM: tpm: Don't send control-deep-sleep for cr50

Cr50 currently ignores requests to enable/disable deep-sleep by sending
a vendor-specific command. Stop sending those commands from cr50
drivers.

BUG= chromium:818749 
BUG=chromium:764046
TEST=build

Change-Id: I731b89bac39324f63f069eceee32d30a5062ae2c
Signed-off-by: Andrey Pronin <apronin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/950129
Reviewed-by: Duncan Laurie <dlaurie@google.com>

[modify] https://crrev.com/e302a79212f507a1db4f097b69bea314579a67d4/drivers/char/tpm/cr50_spi.c
[modify] https://crrev.com/e302a79212f507a1db4f097b69bea314579a67d4/drivers/char/tpm/cr50_i2c.c
[modify] https://crrev.com/e302a79212f507a1db4f097b69bea314579a67d4/drivers/char/tpm/cr50.c
[modify] https://crrev.com/e302a79212f507a1db4f097b69bea314579a67d4/drivers/char/tpm/cr50.h

Project Member

Comment 4 by bugdroid1@chromium.org, Mar 26 2018

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

commit 37c3af00817efee2cfcbc872206720c83f97fa74
Author: Andrey Pronin <apronin@chromium.org>
Date: Mon Mar 26 21:41:36 2018

CHROMIUM: i2c: designware: Revert dev_err in EREMOTEIO case

This reverts commit 2b30c35b0aa29c42841201a4d2a34a39593e2d27 ("CHROMIUM:
i2c: designware: dev_err in EREMOTEIO case").

We no longer need reporting at a higher-than-debug level for these
communication errors. b/35648537, which investigation needed this
extra debug info, is fixed.

BUG=chromium:764046
TEST=build

Change-Id: I12c34efd940cfc64adcb03f54e1af7ba2751fcdb
Signed-off-by: Andrey Pronin <apronin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/961244
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Reviewed-by: Duncan Laurie <dlaurie@google.com>

[modify] https://crrev.com/37c3af00817efee2cfcbc872206720c83f97fa74/drivers/i2c/busses/i2c-designware-core.c

Components: OS>Kernel>TPM
Looks like this is fixed?

Sign in to add a comment