Message ID | 1412711101-988-16-git-send-email-christophe-h.ricard@st.com |
---|---|
State | Superseded, archived |
Headers | show |
diff --git a/drivers/char/tpm/tpm_i2c_stm_st33.c b/drivers/char/tpm/tpm_i2c_stm_st33.c index de9f12e..4c78845 100644 --- a/drivers/char/tpm/tpm_i2c_stm_st33.c +++ b/drivers/char/tpm/tpm_i2c_stm_st33.c @@ -509,6 +509,7 @@ static int tpm_stm_i2c_send(struct tpm_chip *chip, unsigned char *buf, return len; out_err: tpm_stm_i2c_cancel(chip); + usleep_range(100, 250); release_locality(chip); return r; } @@ -557,6 +558,7 @@ static int tpm_stm_i2c_recv(struct tpm_chip *chip, unsigned char *buf, out: chip->ops->cancel(chip); + usleep_range(100, 250); release_locality(chip); return size; }
In order to manage irq, locality must be active. As Status Ready interrupt is activated, when going back into ready state with the cancel function, we need to add a little delay to make sure the irq is going to be serviced before the release_locality is hit. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> --- drivers/char/tpm/tpm_i2c_stm_st33.c | 2 ++ 1 file changed, 2 insertions(+)