diff mbox

[v3,2/2] tpm_tis_spi: add max xfer size

Message ID 1469677797-74304-3-git-send-email-apronin@chromium.org (mailing list archive)
State New, archived
Headers show

Commit Message

Andrey Pronin July 28, 2016, 3:49 a.m. UTC
Reject burstcounts larger than 64 bytes reported by tpm.
SPI Hardware Protocol defined in section 6.4 of TCG PTP
Spec supports up to 64 bytes of data in a transaction.

Signed-off-by: Andrey Pronin <apronin@chromium.org>
---
 drivers/char/tpm/tpm_tis_spi.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Dmitry Torokhov July 28, 2016, 10:53 p.m. UTC | #1
On Wed, Jul 27, 2016 at 08:49:57PM -0700, Andrey Pronin wrote:
> Reject burstcounts larger than 64 bytes reported by tpm.
> SPI Hardware Protocol defined in section 6.4 of TCG PTP
> Spec supports up to 64 bytes of data in a transaction.
> 
> Signed-off-by: Andrey Pronin <apronin@chromium.org>

Reviewed-by: Dmitry Torokhov <dtor@chromium.org>

> ---
>  drivers/char/tpm/tpm_tis_spi.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/char/tpm/tpm_tis_spi.c b/drivers/char/tpm/tpm_tis_spi.c
> index dbaad9c..b103373 100644
> --- a/drivers/char/tpm/tpm_tis_spi.c
> +++ b/drivers/char/tpm/tpm_tis_spi.c
> @@ -206,6 +206,7 @@ static const struct tpm_tis_phy_ops tpm_spi_phy_ops = {
>  	.read16 = tpm_tis_spi_read16,
>  	.read32 = tpm_tis_spi_read32,
>  	.write32 = tpm_tis_spi_write32,
> +	.max_xfer_size = MAX_SPI_FRAMESIZE,
>  };
>  
>  static int tpm_tis_spi_probe(struct spi_device *dev)
> -- 
> 2.6.6
>
Jarkko Sakkinen Aug. 9, 2016, 8:14 a.m. UTC | #2
On Thu, Jul 28, 2016 at 03:53:16PM -0700, Dmitry Torokhov wrote:
> On Wed, Jul 27, 2016 at 08:49:57PM -0700, Andrey Pronin wrote:
> > Reject burstcounts larger than 64 bytes reported by tpm.
> > SPI Hardware Protocol defined in section 6.4 of TCG PTP
> > Spec supports up to 64 bytes of data in a transaction.
> > 
> > Signed-off-by: Andrey Pronin <apronin@chromium.org>
> 
> Reviewed-by: Dmitry Torokhov <dtor@chromium.org>

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

/Jarkko

> > ---
> >  drivers/char/tpm/tpm_tis_spi.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/char/tpm/tpm_tis_spi.c b/drivers/char/tpm/tpm_tis_spi.c
> > index dbaad9c..b103373 100644
> > --- a/drivers/char/tpm/tpm_tis_spi.c
> > +++ b/drivers/char/tpm/tpm_tis_spi.c
> > @@ -206,6 +206,7 @@ static const struct tpm_tis_phy_ops tpm_spi_phy_ops = {
> >  	.read16 = tpm_tis_spi_read16,
> >  	.read32 = tpm_tis_spi_read32,
> >  	.write32 = tpm_tis_spi_write32,
> > +	.max_xfer_size = MAX_SPI_FRAMESIZE,
> >  };
> >  
> >  static int tpm_tis_spi_probe(struct spi_device *dev)
> > -- 
> > 2.6.6
> > 
> 
> -- 
> Dmitry

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. http://sdm.link/zohodev2dev
diff mbox

Patch

diff --git a/drivers/char/tpm/tpm_tis_spi.c b/drivers/char/tpm/tpm_tis_spi.c
index dbaad9c..b103373 100644
--- a/drivers/char/tpm/tpm_tis_spi.c
+++ b/drivers/char/tpm/tpm_tis_spi.c
@@ -206,6 +206,7 @@  static const struct tpm_tis_phy_ops tpm_spi_phy_ops = {
 	.read16 = tpm_tis_spi_read16,
 	.read32 = tpm_tis_spi_read32,
 	.write32 = tpm_tis_spi_write32,
+	.max_xfer_size = MAX_SPI_FRAMESIZE,
 };
 
 static int tpm_tis_spi_probe(struct spi_device *dev)