Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757319AbbFPUhR (ORCPT ); Tue, 16 Jun 2015 16:37:17 -0400 Received: from mout.gmx.net ([212.227.15.19]:61261 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752916AbbFPUhO (ORCPT ); Tue, 16 Jun 2015 16:37:14 -0400 From: Peter =?iso-8859-15?q?H=FCwe?= To: "Hon Ching(Vicky) Lo" Subject: Re: [PATCH] vTPM: set virtual device before passing to ibmvtpm_reset_crq Date: Tue, 16 Jun 2015 22:37:27 +0200 User-Agent: KMail/1.13.7 (Linux/4.1.0-rc6; KDE/4.14.3; x86_64; ; ) Cc: tpmdd-devel@lists.sourceforge.net, Ashley Lai , Vicky Lo , linux-kernel@vger.kernel.org, Joy Latten References: <1432315382-11711-1-git-send-email-honclo@linux.vnet.ibm.com> In-Reply-To: <1432315382-11711-1-git-send-email-honclo@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201506162237.28679.PeterHuewe@gmx.de> X-Provags-ID: V03:K0:YAtk5E6IM6zZJDS9JM8N//qBylY2u+ZjNPRWJ9iWEQleLKx8k6R MPpqvNldmi2YIR11bXQMGT/wpgrvFB/1hEw9eOJYu7opJCG73leIYmdAnW0qYPBHD/Xm3ti +fxDFU2X6SUwHANJEu9D/4VJdq6kVWaKEEsnB/anREnZNADjS+vPuUU22xXIEO+URjoJWN2 SrCx555HVvcqwHool+wrQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:Coic9kBo3w0=:Wl0FyGMpg9FiAoTI7iQJOl OVtW6Bw48YdaUu/Ae+TKMjNfkegFWz3c37wqe7WyYme1vawlC3PPxGEYiwO8sVm7GsmjVtKhY 8klf5ZToq2AP5WvjHRKek1ztE2gClEANA1GRypjtqW1a5UO2mYgD8Ao77aC6YQgPwhtBlY819 JXzVXeOgloEjMf2SGMbmroz9nnAQQWeF41UhvNFUOLJ+Zmnyp+R/lajPUI6FkVmop+ghWxptf 8kFB+Ph7gsCa8J/CXNSkhn9qKF58EZSisRKDZIYuQ3juWC/Vu1G6vTr9qmo6bnCCDFAQ3xaYJ MXlIKHshssM4RXGQa3UjGRf09owmbjZa2bOSaUpjd8xTuKwn4WtBLVy1y5tRrgVMaqC7NgPlE UNwcKq3lBY6vgy587+t4SMpYrW1QsbmBahe83Un6nHYS02vBhD4aEVK6kRV+BbpOP92ph5hwi dG6ncyOJF1AHZspvInNqPx7413dHsd8XhqWoskWG6mHqKpjVnOtLB9bjAwjpPnYTObxkxLvYh VvpRTPt4eVTMRBKjoYT6TejTyHmOKyHCH29IwpymQKfbq1pmQ5zGApLGGur2zvDbVd07bZPhX OX3XQx89rlIWEqyy3RPtbLpFANNyzLuPGw2rhqobeoXxmqXH4c56QjMBKGs8e9jNCItT/qtaG PWxOoOafvjS1gYTcJcJXK3TNYieCnik7X0yLzwLw3GpQj4qLqT1r7K5v7YHvIseZJZ/0= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1580 Lines: 47 Hey, Am Freitag, 22. Mai 2015, 19:23:02 schrieb Hon Ching(Vicky) Lo: > 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 > Signed-off-by: Joy Latten > --- > 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); Is this a fix for something? does it need to go through stable? Thanks, Peter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/