From: "Hon Ching(Vicky) Lo" <honclo@linux.vnet.ibm.com>
To: tpmdd-devel@lists.sourceforge.net
Cc: Peter Huewe <PeterHuewe@gmx.de>,
Ashley Lai <ashley@ashleylai.com>,
Vicky Lo <honclo2014@gmail.com>,
linux-kernel@vger.kernel.org,
"Hon Ching(Vicky) Lo" <honclo@linux.vnet.ibm.com>,
Joy Latten <jmlatten@linux.vnet.ibm.com>
Subject: [PATCH] vTPM: set virtual device before passing to ibmvtpm_reset_crq
Date: Fri, 22 May 2015 13:23:02 -0400 [thread overview]
Message-ID: <1432315382-11711-1-git-send-email-honclo@linux.vnet.ibm.com> (raw)
tpm_ibmvtpm_probe() calls ibmvtpm_reset_crq(ibmvtpm) without having yet
set the virtual device in the ibmvtpm structure. So in ibmvtpm_reset_crq,
the phype call contains empty unit addresses, ibmvtpm->vdev->unit_address.
Signed-off-by: Hon Ching(Vicky) Lo <honclo@linux.vnet.ibm.com>
Signed-off-by: Joy Latten <jmlatten@linux.vnet.ibm.com>
---
drivers/char/tpm/tpm_ibmvtpm.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/char/tpm/tpm_ibmvtpm.c b/drivers/char/tpm/tpm_ibmvtpm.c
index 42ffa5e..27ebf95 100644
--- a/drivers/char/tpm/tpm_ibmvtpm.c
+++ b/drivers/char/tpm/tpm_ibmvtpm.c
@@ -578,6 +578,9 @@ static int tpm_ibmvtpm_probe(struct vio_dev *vio_dev,
goto cleanup;
}
+ ibmvtpm->dev = dev;
+ ibmvtpm->vdev = vio_dev;
+
crq_q = &ibmvtpm->crq_queue;
crq_q->crq_addr = (struct ibmvtpm_crq *)get_zeroed_page(GFP_KERNEL);
if (!crq_q->crq_addr) {
@@ -622,8 +625,6 @@ static int tpm_ibmvtpm_probe(struct vio_dev *vio_dev,
crq_q->index = 0;
- ibmvtpm->dev = dev;
- ibmvtpm->vdev = vio_dev;
TPM_VPRIV(chip) = (void *)ibmvtpm;
spin_lock_init(&ibmvtpm->rtce_lock);
--
1.7.1
next reply other threads:[~2015-05-22 17:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-22 17:23 Hon Ching(Vicky) Lo [this message]
2015-06-02 5:50 ` [PATCH] vTPM: set virtual device before passing to ibmvtpm_reset_crq Ashley Lai
2015-06-16 20:37 ` Peter Hüwe
2015-06-16 21:18 ` Hon Ching (Vicky) Lo
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=1432315382-11711-1-git-send-email-honclo@linux.vnet.ibm.com \
--to=honclo@linux.vnet.ibm.com \
--cc=PeterHuewe@gmx.de \
--cc=ashley@ashleylai.com \
--cc=honclo2014@gmail.com \
--cc=jmlatten@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tpmdd-devel@lists.sourceforge.net \
/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).