]> git.karo-electronics.de Git - linux-beck.git/commit
tpm/st33zp24: Add proper wait for ordinal duration in case of irq mode
authorChristophe Ricard <christophe.ricard@gmail.com>
Mon, 23 Mar 2015 21:29:56 +0000 (22:29 +0100)
committerPeter Huewe <peterhuewe@gmx.de>
Fri, 27 Mar 2015 01:50:34 +0000 (02:50 +0100)
commit7216ebc51bdd62517be6878dd37555ff428a80c9
treeecb34d5c217374747ec38c2ccd6b42bae09e4bbb
parent6b37729bd184fdd44f144c6cc4951b06b55bcf4b
tpm/st33zp24: Add proper wait for ordinal duration in case of irq mode

In case the driver is configured to use irq, we are not waiting the answer
for a duration period to see the DATA_AVAIL status bit to raise but at
maximum timeout_c. This may result in critical failure as we will
not wait long enough for the command completion.

Reviewed-by: Jason Gunthorpe <jason.gunthorpe@obsidianresearch.com>
Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Fixes: bf38b8710892 ("tpm/tpm_i2c_stm_st33: Split tpm_i2c_tpm_st33 in 2
layers (core + phy)")
Reviewed-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
drivers/char/tpm/st33zp24/st33zp24.c