public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko@kernel.org>
To: Gunnar Kudrjavets <gunnarku@amazon.com>
Cc: peterhuewe@gmx.de, jgg@ziepe.ca, stefanb@linux.vnet.ibm.com,
	christophe.ricard@gmail.com, linux-integrity@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Justinien Bouron <jbouron@amazon.com>
Subject: Re: [PATCH] tpm_tis: Fix incorrect arguments in tpm_tis_probe_irq_single
Date: Mon, 15 Sep 2025 21:42:33 +0300	[thread overview]
Message-ID: <aMheGdW3jqfGIPlh@kernel.org> (raw)
In-Reply-To: <20250915182105.6664-1-gunnarku@amazon.com>

On Mon, Sep 15, 2025 at 06:20:44PM +0000, Gunnar Kudrjavets wrote:
> The tpm_tis_write8() call specifies arguments in wrong order. Should be
> (data, addr, value) not (data, value, addr). The initial correct order
> was changed during the major refactoring when the code was split.
> 
> Fixes: 41a5e1cf1fe1 ("tpm/tpm_tis: Split tpm_tis driver into a core and TCG TIS compliant phy")
> Signed-off-by: Gunnar Kudrjavets <gunnarku@amazon.com>
> Reviewed-by: Justinien Bouron <jbouron@amazon.com>
> ---
>  drivers/char/tpm/tpm_tis_core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c
> index 4b12c4b9da8b..8954a8660ffc 100644
> --- a/drivers/char/tpm/tpm_tis_core.c
> +++ b/drivers/char/tpm/tpm_tis_core.c
> @@ -978,8 +978,8 @@ static int tpm_tis_probe_irq_single(struct tpm_chip *chip, u32 intmask,
>  	 * will call disable_irq which undoes all of the above.
>  	 */
>  	if (!(chip->flags & TPM_CHIP_FLAG_IRQ)) {
> -		tpm_tis_write8(priv, original_int_vec,
> -			       TPM_INT_VECTOR(priv->locality));
> +		tpm_tis_write8(priv, TPM_INT_VECTOR(priv->locality),
> +			       original_int_vec);
>  		rc = -1;
>  	}
> 
> 
> base-commit: f83ec76bf285bea5727f478a68b894f5543ca76e
> --
> 2.47.3
> 

Amazing catch, thank you. Have you been able to verify this?

I'm asking this because post this there was a lot of unsuccesful
attempts to enable irqs in the tis driver (which have never really
worked too well since epoch) so perhaps this could move things
forward.

Thus, I'm interested do you happen to have a working testing
environment?


Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>

BR, Jarkko

  reply	other threads:[~2025-09-15 18:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-15 18:20 [PATCH] tpm_tis: Fix incorrect arguments in tpm_tis_probe_irq_single Gunnar Kudrjavets
2025-09-15 18:42 ` Jarkko Sakkinen [this message]
2025-09-15 20:15 ` Paul Menzel
  -- strict thread matches above, loose matches on Subject: below --
2025-09-15 19:49 Kudrjavets, Gunnar

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=aMheGdW3jqfGIPlh@kernel.org \
    --to=jarkko@kernel.org \
    --cc=christophe.ricard@gmail.com \
    --cc=gunnarku@amazon.com \
    --cc=jbouron@amazon.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterhuewe@gmx.de \
    --cc=stefanb@linux.vnet.ibm.com \
    /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