As I suspected.
-------- Mensagem original --------
Assunto: Re: [tpmdd-devel] Fwd: Re: [TrouSerS-tech] Fwd: Re: ST33 I2C
TPM issues
Data: Fri, 8 Nov 2013 11:17:00 -0700
De: Jason Gunthorpe <[email protected]>
Para: Richard <[email protected]>
CC: [email protected]
On Fri, Nov 08, 2013 at 01:01:24PM -0200, Richard wrote:
An user of the trousers application (which implements the TSS stack) is having
issues with his ST33 I2C TPM initialization, because no software (trousers/
device driver) calls the 'TPM_SelfTestFull/TPM_ContinueSelfTest' command(s).
In my opinion the device driver should be the software which executes the
aforementioned command(s), however, I'd like to have your opinion on the
matter.
Most device drivers do call 'tpm_do_selftest' which executes a
TPM_ContinueSelfTest. tpm_i2c_stm_st33 is just pointlessly different,
I think it is bug.
Part of my clean up work is going to be to pull those calls into the
core, so we don't have these needless behavioural differences.
These days we have the general assumption that the TPM is usable by
the kernel immediately after the driver is finished, so we can no
longer defer the mandatory self test to userspace.
If you test this patch it can go in:
diff --git a/drivers/char/tpm/tpm_i2c_stm_st33.c
b/drivers/char/tpm/tpm_i2c_stm_st33.c
index 5bb8e2d..bbd2c213 100644
--- a/drivers/char/tpm/tpm_i2c_stm_st33.c
+++ b/drivers/char/tpm/tpm_i2c_stm_st33.c
@@ -745,6 +745,7 @@ tpm_st33_i2c_probe(struct i2c_client *client, const struct
i2c_device_id *id)
}
tpm_get_timeouts(chip);
+ tpm_do_selftest(chip);
i2c_set_clientdata(client, chip);
(noting the error handling on both tpm_get_timeouts and do_selftest is
wrong, all the error handling is wrong :(, feeling it is best to fix
it in all drivers in one go by pulling it into core code)
As a related question - if anyone knows a reason why some drivers
don't call, or shouldn't call tpm_do_selftest, please share :)
Jason
------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
TrouSerS-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/trousers-tech