From patchwork Wed Jul 10 09:41:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Ma X-Patchwork-Id: 1130310 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45kDj34HCsz9sBF; Wed, 10 Jul 2019 19:41:27 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1hl96K-0002bs-CJ; Wed, 10 Jul 2019 09:41:24 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1hl96I-0002bm-6y for kernel-team@lists.ubuntu.com; Wed, 10 Jul 2019 09:41:22 +0000 Received: from [114.249.243.148] (helo=localhost.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1hl96H-0000b3-24 for kernel-team@lists.ubuntu.com; Wed, 10 Jul 2019 09:41:21 +0000 From: Aaron Ma To: kernel-team@lists.ubuntu.com Subject: [PATCH 0/2][SRU][B/OEM-B]Fix resume failure on some TPM chips Date: Wed, 10 Jul 2019 17:41:10 +0800 Message-Id: <20190710094112.13345-1-aaron.ma@canonical.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1836031 [Impact] System will reboot when resume from S3 with some TPM chips installed. [Fix] stable patch is merged in 4.15 kernel: 888d867df441 (tpm: cmd_ready command can be issued only after granting locality) it needs a fix: tpm: separate cmd_ready/go_idle from runtime_pm these 2 patches fix the issue and enable tpm resume after seprating cmd_ready/go_idle. [Test] Verified on hardware. resume from S3 about 30 times with positive result. [Regression Potential] Medium, stable patches backported. Verified on hardware. backported with minor adjustion. These 2 patches are included in 4.18 and 5.0 kernel, only 4.15 needs them. Tomas Winkler (2): tpm: separate cmd_ready/go_idle from runtime_pm tpm: tpm_try_transmit() refactor error flow. drivers/char/tpm/tpm-interface.c | 58 ++++++++++++++---- drivers/char/tpm/tpm.h | 12 +++- drivers/char/tpm/tpm2-space.c | 16 +++-- drivers/char/tpm/tpm_crb.c | 101 +++++++++---------------------- include/linux/tpm.h | 2 + 5 files changed, 94 insertions(+), 95 deletions(-)