lkml.org 
[lkml]   [2015]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [BUG, bisect, PATCH 04/10] tpm: move the PPI attributes to character device directory.
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 <jarkko.sakkinen@linux.intel.com>
> > Reviewed-by: Jason Gunthorpe <jason.gunthorpe@obsidianresearch.com>
> > Tested-by: Mimi Zohar <zohar@linux.vnet.ibm.com> (on TPM 1.2)
> > Tested-by: Chris J Arges <chris.j.arges@canonical.com>
> > Tested-by: Colin Ian King <colin.king@canonical.com>
> > ---
> > 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


\
 
 \ /
  Last update: 2015-11-07 04:01    [W:0.113 / U:2.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site