linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jerry Snitselaar <jsnitsel@redhat.com>
To: Christian Bundy <christianbundy@fraction.io>,
	Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>,
	linux-integrity@vger.kernel.org
Subject: Re: PROBLEM: TPM bug causes suspend to turn off device
Date: Mon, 11 Nov 2019 14:57:14 -0700	[thread overview]
Message-ID: <20191111215714.kw3doe3qf5ps7imk@cantor> (raw)
In-Reply-To: <20191110072611.2k6tjt4geiq2rqol@cantor>

On Sun Nov 10 19, Jerry Snitselaar wrote:
>Jarkko, should there be tpm_chip_start/tpm_chip_stop calls around
>the tpm1_getcap calls in tpm1_get_timeouts?
>

Maybe moving the tpm_chip_start called before the irq probe to before
tpm_get_timeouts:

diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c
index 270f43acbb77..806acc666696 100644
--- a/drivers/char/tpm/tpm_tis_core.c
+++ b/drivers/char/tpm/tpm_tis_core.c
@@ -974,13 +974,14 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,
                  * to make sure it works. May as well use that command to set the
                  * proper timeouts for the driver.
                  */
+               tpm_chip_start(chip);
                 if (tpm_get_timeouts(chip)) {
                         dev_err(dev, "Could not get TPM timeouts and durations\n");
                         rc = -ENODEV;
+                       tpm_chip_stop(chip);
                         goto out_err;
                 }
  
-               tpm_chip_start(chip);
                 chip->flags |= TPM_CHIP_FLAG_IRQ;
                 if (irq) {
                         tpm_tis_probe_irq_single(chip, intmask, IRQF_SHARED,


  reply	other threads:[~2019-11-11 21:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-08 19:13 PROBLEM: TPM bug causes suspend to turn off device Christian Bundy
2019-11-10  7:26 ` Jerry Snitselaar
2019-11-11 21:57   ` Jerry Snitselaar [this message]
2019-11-11 22:44     ` Christian Bundy
2019-11-12 19:43   ` Jarkko Sakkinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191111215714.kw3doe3qf5ps7imk@cantor \
    --to=jsnitsel@redhat.com \
    --cc=christianbundy@fraction.io \
    --cc=jarkko.sakkinen@linux.intel.com \
    --cc=linux-integrity@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).