From patchwork Mon Jul 26 13:15:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai-Heng Feng X-Patchwork-Id: 1510019 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) 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; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=l0IyXzNB; dkim-atps=neutral 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 4GYL5s37J3z9t0T; Mon, 26 Jul 2021 23:16:01 +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 1m80Sb-0002l7-DL; Mon, 26 Jul 2021 13:15:57 +0000 Received: from smtp-relay-canonical-1.internal ([10.131.114.174] helo=smtp-relay-canonical-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1m80SZ-0002kN-TR for kernel-team@lists.ubuntu.com; Mon, 26 Jul 2021 13:15:55 +0000 Received: from localhost (1.general.khfeng.us.vpn [10.172.68.174]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id C78673F34E for ; Mon, 26 Jul 2021 13:15:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1627305355; bh=7JVVLc3opwmY0IGPXn3beEg51xjij2IjhpWqYTGBs6o=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=l0IyXzNBVsh7HwsrDi497tBrgaPzGcxn7WXlB9tT9eXsFTwd01QalBf7Zjegf7JrD 0LBmU1KPCIsjYvXq48Zd/oRgjR87uN4o8rBGB7Z4r1acbxqRjddEyY8oKCGMtn0w9s lxIfmhVUvlOiIrANiHWCYBasSWE+IRICAeDT5iIq6df5SmKPxSxiLeVAGD86qTaWdE vUJcqy4GUBiRZ9bvbLcVAlpfY0/cVOecuJKQowjO2ivJhhBvMT01tKawVRkxzPhm4n MiEnFY5anah7J71rqqjqda2ViubpHAYQok5lqMVFZJzdy1bqcmkzcaD7GiQw5/RkY1 Znh+LQsDsdriQ== From: Kai-Heng Feng To: kernel-team@lists.ubuntu.com Subject: [I/Unstable/OEM-5.13] [PATCH 08/10] platform/x86: amd-pmc: Use return code on suspend Date: Mon, 26 Jul 2021 21:15:07 +0800 Message-Id: <20210726131509.280913-9-kai.heng.feng@canonical.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210726131509.280913-1-kai.heng.feng@canonical.com> References: <20210726131509.280913-1-kai.heng.feng@canonical.com> 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" From: Mario Limonciello BugLink: https://bugs.launchpad.net/bugs/1934809 Right now the driver will still return success even if the OS_HINT command failed to send to the SMU. In the rare event of a failure, the suspend should really be aborted here so that relevant logs can may be captured. Signed-off-by: Mario Limonciello Acked-by: Shyam Sundar S K Link: https://lore.kernel.org/r/20210707141647.8871-1-mario.limonciello@amd.com Signed-off-by: Hans de Goede (cherry picked from commit a973c983375c37301645d4fea056b1f4bff77bf7 linux-next) Signed-off-by: Kai-Heng Feng --- drivers/platform/x86/amd-pmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/amd-pmc.c b/drivers/platform/x86/amd-pmc.c index d2f9a62e11660..680f94c7e075b 100644 --- a/drivers/platform/x86/amd-pmc.c +++ b/drivers/platform/x86/amd-pmc.c @@ -353,7 +353,7 @@ static int __maybe_unused amd_pmc_suspend(struct device *dev) if (rc) dev_err(pdev->dev, "suspend failed\n"); - return 0; + return rc; } static int __maybe_unused amd_pmc_resume(struct device *dev)