tpmdd-devel Archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	Jarkko Sakkinen
	<jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Subject: [PATCH v2 1/3] tpm_tis: Fix IRQ autoprobing when using platform_device
Date: Thu,  4 May 2017 09:53:23 -0600	[thread overview]
Message-ID: <1493913205-18276-2-git-send-email-jgunthorpe@obsidianresearch.com> (raw)
In-Reply-To: <1493913205-18276-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

The test was backwards, triggering IRQ autoprobing if the firmware
did not specify an IRQ, instead of triggering it only when the
module force parameter was specified.

Since autoprobing is not enabled on !x86 and the platform device is
currently only used on !x86, or with force, this has gone unnoticed.

Fixes: 00194826e6be ("tpm_tis: Clean up the force=1 module parameter")
Tested-by: Jerry Snitselaar <jsnitsel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 drivers/char/tpm/tpm_tis.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
index c7e1384f1b0802..56ce2bb1916693 100644
--- a/drivers/char/tpm/tpm_tis.c
+++ b/drivers/char/tpm/tpm_tis.c
@@ -336,7 +336,7 @@ static int tpm_tis_plat_probe(struct platform_device *pdev)
 	if (res) {
 		tpm_info.irq = res->start;
 	} else {
-		if (pdev == force_pdev)
+		if (pdev != force_pdev)
 			tpm_info.irq = -1;
 		else
 			/* When forcing auto probe the IRQ */
-- 
2.7.4


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

  parent reply	other threads:[~2017-05-04 15:53 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-04 15:53 [PATCH v2 0/3] Merge tpm_tis ACPI and platform drivers Jason Gunthorpe
     [not found] ` <1493913205-18276-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-05-04 15:53   ` Jason Gunthorpe [this message]
     [not found]     ` <1493913205-18276-2-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-05-08 23:45       ` [PATCH v2 1/3] tpm_tis: Fix IRQ autoprobing when using platform_device Jarkko Sakkinen
     [not found]         ` <20170508234502.2fhj5edbcubdalb5-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-05-09 14:03           ` Jarkko Sakkinen
     [not found]             ` <20170509140301.bqh3hgpjccdcbj5p-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-05-09 14:21               ` Jarkko Sakkinen
2017-05-04 15:53   ` [PATCH v2 2/3] tpm_tis: Use platform_get_irq Jason Gunthorpe
     [not found]     ` <1493913205-18276-3-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-05-08 23:45       ` Jarkko Sakkinen
     [not found]         ` <20170508234539.qnhf6p7fwxxcb5ul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-05-09 14:03           ` Jarkko Sakkinen
     [not found]             ` <20170509140345.tqesdnggeb3s67be-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-05-09 14:21               ` Jarkko Sakkinen
2017-05-08 23:49       ` Jarkko Sakkinen
2017-05-04 15:53   ` [PATCH v2 3/3] tpm_tis: Consolidate the platform and acpi probe flow Jason Gunthorpe
     [not found]     ` <1493913205-18276-4-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-05-08 23:50       ` Jarkko Sakkinen
     [not found]         ` <20170508235033.qcq6my5dvpyvwrwx-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-05-09 14:04           ` Jarkko Sakkinen
     [not found]             ` <20170509140425.zr5hrxpjiytp6hpd-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-05-09 14:22               ` Jarkko Sakkinen
2017-05-05  6:45   ` [PATCH v2 0/3] Merge tpm_tis ACPI and platform drivers Jerry Snitselaar
2017-05-08 23:52     ` Jarkko Sakkinen
     [not found]       ` <20170508235219.2zczjmnujaenw2sv-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-05-09  0:27         ` Jerry Snitselaar
2017-05-09 14:07           ` 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=1493913205-18276-2-git-send-email-jgunthorpe@obsidianresearch.com \
    --to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
    --cc=jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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 read-only IMAP folder(s) and NNTP newsgroup(s).