Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1033352AbbKGCyo (ORCPT ); Fri, 6 Nov 2015 21:54:44 -0500 Received: from mail-pa0-f68.google.com ([209.85.220.68]:33551 "EHLO mail-pa0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030213AbbKGCyl (ORCPT ); Fri, 6 Nov 2015 21:54:41 -0500 Date: Fri, 6 Nov 2015 18:54:39 -0800 From: Jeremiah Mahler To: Jarkko Sakkinen , tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, peterhuewe@gmx.de, gregkh@linuxfoundation.org, jgunthorpe@obsidianresearch.com, dhowells@redhat.com, artem.bityutskiy@linux.intel.com, Marcel Selhorst Subject: Re: [BUG, bisect, PATCH 04/10] tpm: move the PPI attributes to character device directory. Message-ID: <20151107025439.GA2911@newt.localdomain> Mail-Followup-To: Jeremiah Mahler , Jarkko Sakkinen , tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, peterhuewe@gmx.de, gregkh@linuxfoundation.org, jgunthorpe@obsidianresearch.com, dhowells@redhat.com, artem.bityutskiy@linux.intel.com, Marcel Selhorst References: <1445020843-9382-1-git-send-email-jarkko.sakkinen@linux.intel.com> <1445020843-9382-5-git-send-email-jarkko.sakkinen@linux.intel.com> <20151104181705.GA2294@newt.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151104181705.GA2294@newt.localdomain> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2474 Lines: 68 Jarkko, On Wed, Nov 04, 2015 at 10:17:05AM -0800, Jeremiah Mahler wrote: > Jarkko, all, > > On Fri, Oct 16, 2015 at 09:40:23PM +0300, Jarkko Sakkinen wrote: > > Moved PPI attributes to the character device directory. This aligns with > > the sysfs guidelines and makes them race free because they are created > > atomically with the character device as part of device_register().The > > character device and the sysfs attributes appear at the same time to the > > user space. > > > > As part of this change we enable PPI attributes also for TPM 2.0 > > devices. In order to retain backwards compatibility with TPM 1.x > > devices, a symlink is created to the platform device directory. > > > > Signed-off-by: Jarkko Sakkinen > > Reviewed-by: Jason Gunthorpe > > Tested-by: Mimi Zohar (on TPM 1.2) > > Tested-by: Chris J Arges > > Tested-by: Colin Ian King > > --- > > drivers/char/tpm/tpm-chip.c | 24 ++++++++++++++++-------- > > drivers/char/tpm/tpm.h | 17 ++++++----------- > > drivers/char/tpm/tpm_ppi.c | 34 +++++++++++----------------------- > > 3 files changed, 33 insertions(+), 42 deletions(-) > > [...] > > @@ -225,10 +220,20 @@ int tpm_chip_register(struct tpm_chip *chip) > > if (rc) > > return rc; > > > > + tpm_add_ppi(chip); > > + > > rc = tpm_dev_add_device(chip); > > if (rc) > > goto out_err; > > > > + if (!(chip->flags & TPM_CHIP_FLAG_TPM2)) { > > + rc = __compat_only_sysfs_link_entry_to_kobj(&chip->pdev->kobj, > > + &chip->dev.kobj, > > + "ppi"); > > + if (rc) > > + goto out_err; > > + } > > + This new call to __compat_only_sysfs_link_entry_to_kobj fails on an Acer C720 due to a failed call to kernfs_find_and_get (discussed in a second message). [...] > > The commit for this patch (9b774d5cf2db4) present in the latest > linux-next (20151101+) breaks suspend/resume on an Acer C720 Chromebook. > The computer will successfully suspend but when a resume is attempted > a blank screen is displayed for a few seconds and then it reboots. > > -- > - Jeremiah Mahler -- - Jeremiah Mahler -- 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/