Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1446468
| Path | csiph.com!news.redatomik.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> |
| Newsgroups | linux.kernel |
| Subject | [PATCH v3 4/5] tpm: use tpm_transmit_cmd() in tpm2_probe() |
| Date | Tue, 19 Jul 2016 15:40:01 +0200 |
| Message-ID | <rWDpD-4AM-3@gated-at.bofh.it> (permalink) |
| References | <rWDpD-4AM-5@gated-at.bofh.it> |
| X-Extloop1 | 1 |
| X-Ironport-Av | E=Sophos;i="5.28,389,1464678000"; d="scan'208";a="736626732" |
| X-Mailer | git-send-email 2.7.4 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 27 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-security-module@vger.kernel.org, Stefan Berger <stefanb@linux.vnet.ibm.com>, Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>, Marcel Selhorst <tpmdd@selhorst.net>, tpmdd-devel@lists.sourceforge.net (moderated list:TPM DEVICE DRIVER), linux-kernel@vger.kernel.org (open list) |
| X-Original-Date | Tue, 19 Jul 2016 16:32:48 +0300 |
| X-Original-Message-ID | <1468935171-7815-5-git-send-email-jarkko.sakkinen@linux.intel.com> |
| X-Original-References | <1468935171-7815-1-git-send-email-jarkko.sakkinen@linux.intel.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1446468 |
Show key headers only | View raw
It is better to tpm_transmit_cmd() in tpm2_probe() in order to get consistent command handling throughout the subsystem. Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> --- drivers/char/tpm/tpm2-cmd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/char/tpm/tpm2-cmd.c b/drivers/char/tpm/tpm2-cmd.c index 1c393ba..e1db404 100644 --- a/drivers/char/tpm/tpm2-cmd.c +++ b/drivers/char/tpm/tpm2-cmd.c @@ -911,11 +911,9 @@ int tpm2_probe(struct tpm_chip *chip) cmd.params.get_tpm_pt_in.property_id = cpu_to_be32(0x100); cmd.params.get_tpm_pt_in.property_cnt = cpu_to_be32(1); - rc = tpm_transmit(chip, (const char *) &cmd, sizeof(cmd)); + rc = tpm_transmit_cmd(chip, &cmd, sizeof(cmd), NULL); if (rc < 0) return rc; - else if (rc < TPM_HEADER_SIZE) - return -EFAULT; if (be16_to_cpu(cmd.header.out.tag) == TPM2_ST_NO_SESSIONS) chip->flags |= TPM_CHIP_FLAG_TPM2; -- 2.7.4
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH v3 4/5] tpm: use tpm_transmit_cmd() in tpm2_probe() Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-07-19 15:40 +0200
csiph-web