Re: [PATCH REVIEW 2/2] tpm_tis: override durations for STM tpm with firmware 1.2.8.28
From: Jarkko Sakkinen <hidden>
Date: 2019-01-21 12:29:16
From: Jarkko Sakkinen <hidden>
Date: 2019-01-21 12:29:16
On Sun, Jan 20, 2019 at 02:30:12PM -0700, Jerry Snitselaar wrote:
On Fri Jan 18 19, Jarkko Sakkinen wrote:quoted
On Mon, Jan 14, 2019 at 12:39:40PM -0700, Jerry Snitselaar wrote:quoted
Alexey was following the example of tpm_tis_update_timeouts() which returns true if the timeouts were updated, and otherwise returns false. The bool here makes sense to me, but what rc would you suggest in this case?Maybe the pattern used there is not that great then. The callback should simply be update_durations(chip), and it would do whatever updates needed and either return zero or -errno. And of course update durations_adjusted flag because that is needed in sysfs. /JarkkoTaking a quick look, they already track whether the adjustment occurred in the tpm_chip struct, so that could be used instead for what the bool return was being used for. I'll post a patch for the timeout updates code, and work with Alexey to rework his patchset.
Awesome, thank you! /Jarkko