Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1582670 > unrolled thread

[PATCH 2/5] tpm_tis_spi: Abort transfer when too many wait states are signaled

Started byPeter Huewe <peter.huewe@infineon.com>
First post2017-02-16 17:10 +0100
Last post2017-02-24 14:00 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 2/5] tpm_tis_spi: Abort transfer when too many wait states are signaled Peter Huewe <peter.huewe@infineon.com> - 2017-02-16 17:10 +0100
    Re: [PATCH 2/5] tpm_tis_spi: Abort transfer when too many wait states  are signaled Christophe Ricard <christophe.ricard@gmail.com> - 2017-02-17 06:10 +0100
    Re: [PATCH 2/5] tpm_tis_spi: Abort transfer when too many wait  states are signaled Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-02-24 14:00 +0100

#1582670 — [PATCH 2/5] tpm_tis_spi: Abort transfer when too many wait states are signaled

FromPeter Huewe <peter.huewe@infineon.com>
Date2017-02-16 17:10 +0100
Subject[PATCH 2/5] tpm_tis_spi: Abort transfer when too many wait states are signaled
Message-ID<tbwN4-fF-21@gated-at.bofh.it>
Abort the transfer with ETIMEDOUT when the TPM signals more than
TPM_RETRY wait states. Continuing with the transfer in this state
will only lead to arbitrary failures in other parts of the code.

Cc: <stable@vger.kernel.org>
Fixes: 0edbfea537d1 ("tpm/tpm_tis_spi: Add support for spi phy")
Signed-off-by: Alexander Steffen <Alexander.Steffen@infineon.com>
Signed-off-by: Peter Huewe <peter.huewe@infineon.com>
---
 drivers/char/tpm/tpm_tis_spi.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/char/tpm/tpm_tis_spi.c b/drivers/char/tpm/tpm_tis_spi.c
index 6e1a3c43f621..d782b9974c14 100644
--- a/drivers/char/tpm/tpm_tis_spi.c
+++ b/drivers/char/tpm/tpm_tis_spi.c
@@ -101,6 +101,11 @@ static int tpm_tis_spi_transfer(struct tpm_tis_data *data, u32 addr, u8 len,
 			goto exit;
 	}
 
+	if (i == TPM_RETRY) {
+		ret = -ETIMEDOUT;
+		goto exit;
+	}
+
 	spi_xfer.cs_change = 0;
 	spi_xfer.len = len;
 
-- 
2.7.4

[toc] | [next] | [standalone]


#1583092 — Re: [PATCH 2/5] tpm_tis_spi: Abort transfer when too many wait states are signaled

FromChristophe Ricard <christophe.ricard@gmail.com>
Date2017-02-17 06:10 +0100
SubjectRe: [PATCH 2/5] tpm_tis_spi: Abort transfer when too many wait states are signaled
Message-ID<tbIXT-8g6-3@gated-at.bofh.it>
In reply to#1582670
Nitpick: Are you sure this patch is necessary having #3 on top of it ?

On 16/02/2017 08:08, Peter Huewe wrote:
> Abort the transfer with ETIMEDOUT when the TPM signals more than
> TPM_RETRY wait states. Continuing with the transfer in this state
> will only lead to arbitrary failures in other parts of the code.
>
> Cc: <stable@vger.kernel.org>
> Fixes: 0edbfea537d1 ("tpm/tpm_tis_spi: Add support for spi phy")
> Signed-off-by: Alexander Steffen <Alexander.Steffen@infineon.com>
> Signed-off-by: Peter Huewe <peter.huewe@infineon.com>
> ---
>   drivers/char/tpm/tpm_tis_spi.c | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/drivers/char/tpm/tpm_tis_spi.c b/drivers/char/tpm/tpm_tis_spi.c
> index 6e1a3c43f621..d782b9974c14 100644
> --- a/drivers/char/tpm/tpm_tis_spi.c
> +++ b/drivers/char/tpm/tpm_tis_spi.c
> @@ -101,6 +101,11 @@ static int tpm_tis_spi_transfer(struct tpm_tis_data *data, u32 addr, u8 len,
>   			goto exit;
>   	}
>   
> +	if (i == TPM_RETRY) {
> +		ret = -ETIMEDOUT;
> +		goto exit;
> +	}
> +
>   	spi_xfer.cs_change = 0;
>   	spi_xfer.len = len;
>   

[toc] | [prev] | [next] | [standalone]


#1587573 — Re: [PATCH 2/5] tpm_tis_spi: Abort transfer when too many wait states are signaled

FromJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Date2017-02-24 14:00 +0100
SubjectRe: [PATCH 2/5] tpm_tis_spi: Abort transfer when too many wait states are signaled
Message-ID<tenDA-eO-1@gated-at.bofh.it>
In reply to#1582670
On Thu, Feb 16, 2017 at 04:08:23PM +0000, Peter Huewe wrote:
> Abort the transfer with ETIMEDOUT when the TPM signals more than
> TPM_RETRY wait states. Continuing with the transfer in this state
> will only lead to arbitrary failures in other parts of the code.
> 
> Cc: <stable@vger.kernel.org>
> Fixes: 0edbfea537d1 ("tpm/tpm_tis_spi: Add support for spi phy")
> Signed-off-by: Alexander Steffen <Alexander.Steffen@infineon.com>
> Signed-off-by: Peter Huewe <peter.huewe@infineon.com>

Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>

/Jarkko

> ---
>  drivers/char/tpm/tpm_tis_spi.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/char/tpm/tpm_tis_spi.c b/drivers/char/tpm/tpm_tis_spi.c
> index 6e1a3c43f621..d782b9974c14 100644
> --- a/drivers/char/tpm/tpm_tis_spi.c
> +++ b/drivers/char/tpm/tpm_tis_spi.c
> @@ -101,6 +101,11 @@ static int tpm_tis_spi_transfer(struct tpm_tis_data *data, u32 addr, u8 len,
>  			goto exit;
>  	}
>  
> +	if (i == TPM_RETRY) {
> +		ret = -ETIMEDOUT;
> +		goto exit;
> +	}
> +
>  	spi_xfer.cs_change = 0;
>  	spi_xfer.len = len;
>  
> -- 
> 2.7.4
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web