From patchwork Thu Jul 28 03:49:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Pronin X-Patchwork-Id: 9250647 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9925060869 for ; Thu, 28 Jul 2016 03:50:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A5A21FFBD for ; Thu, 28 Jul 2016 03:50:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7DE1D2522B; Thu, 28 Jul 2016 03:50:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 179922522B for ; Thu, 28 Jul 2016 03:50:12 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=sfs-ml-2.v29.ch3.sourceforge.com) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1bScKn-0006Zj-04; Thu, 28 Jul 2016 03:50:09 +0000 Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1bScKl-0006ZZ-O3 for tpmdd-devel@lists.sourceforge.net; Thu, 28 Jul 2016 03:50:07 +0000 Received-SPF: pass (sog-mx-1.v43.ch3.sourceforge.com: domain of chromium.org designates 209.85.192.177 as permitted sender) client-ip=209.85.192.177; envelope-from=apronin@chromium.org; helo=mail-pf0-f177.google.com; Received: from mail-pf0-f177.google.com ([209.85.192.177]) by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:AES128-SHA:128) (Exim 4.76) id 1bScKl-0003ex-1v for tpmdd-devel@lists.sourceforge.net; Thu, 28 Jul 2016 03:50:07 +0000 Received: by mail-pf0-f177.google.com with SMTP id y134so17314265pfg.0 for ; Wed, 27 Jul 2016 20:50:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=lqPIglbOxDUhg2c7/GmrELaOgvmRF2wT0pLXCHETdI0=; b=RS2QDIia6Sy2ErcLs7Frn1hJvLKhIxM+3BfWK9+2LmPvIasNul4yLNRMK1QLUr1oGz u4/EZM2AtVgXyNqbravSeYaIK+ekW1lp2Bn2FTIcDO4+yF+bAZPcdEpvp24iNuHhT9o3 AHPMc20WRZOMUZW+XaWjz8x66K3PGiKTDhWN/902drcEimqTTjDVi0BfVHBo5F0UHH9g x3F/GnlEa6g4hItEjZohC6bLWajBRg2Xf+lLzL8JKqBnbD3Lj1nScJ+71je7Q6l2Uba9 s7ESxdomuUzFUzouMPgA8hgL+kB7ug1W4Z7HpQS+0IH2JBXX3f3Ouye/Q0ycgVXRm+jq u2FQ== X-Gm-Message-State: AEkoouvXxEeI9PUApJxQR3BU0eo6pGV0emR6vAfF+wontm7AhjY45qliCfuVw9bhh3NbGMBN X-Received: by 10.98.7.200 with SMTP id 69mr55665831pfh.33.1469677801359; Wed, 27 Jul 2016 20:50:01 -0700 (PDT) Received: from apronin0.mtv.corp.google.com ([172.22.64.136]) by smtp.gmail.com with ESMTPSA id t80sm12483771pfj.38.2016.07.27.20.50.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 27 Jul 2016 20:50:00 -0700 (PDT) From: Andrey Pronin To: Jarkko Sakkinen Date: Wed, 27 Jul 2016 20:49:57 -0700 Message-Id: <1469677797-74304-3-git-send-email-apronin@chromium.org> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 In-Reply-To: <1469677797-74304-1-git-send-email-apronin@chromium.org> References: <1468546745-14646-1-git-send-email-apronin@chromium.org> <1469677797-74304-1-git-send-email-apronin@chromium.org> In-Reply-To: <1468546745-14646-1-git-send-email-apronin@chromium.org> References: <1468546745-14646-1-git-send-email-apronin@chromium.org> X-Headers-End: 1bScKl-0003ex-1v Cc: Christophe Ricard , dianders@chromium.org, linux-kernel@vger.kernel.org, smbarber@chromium.org, tpmdd-devel@lists.sourceforge.net, dtor@chromium.org Subject: [tpmdd-devel] [PATCH v3 2/2] tpm_tis_spi: add max xfer size X-BeenThere: tpmdd-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Tpm Device Driver maintainance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: tpmdd-devel-bounces@lists.sourceforge.net X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Dmitry Torokhov Reviewed-by: Jarkko Sakkinen --- 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)