From: Hans de Goede <hdegoede@redhat.com>
To: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>,
ilpo.jarvinen@linux.intel.com
Cc: platform-driver-x86@vger.kernel.org, Patil.Reddy@amd.com,
mario.limonciello@amd.com
Subject: Re: [PATCH v3 2/2] platform/x86/amd/pmf: Fix TEE enact command failure after suspend and resume
Date: Sun, 18 Feb 2024 11:25:35 +0100 [thread overview]
Message-ID: <2969e76d-1505-4122-959b-ee92b887ea7a@redhat.com> (raw)
In-Reply-To: <20240216064112.962582-2-Shyam-sundar.S-k@amd.com>
Hi,
On 2/16/24 07:41, Shyam Sundar S K wrote:
> TEE enact command failures are seen after each suspend/resume cycle;
> fix this by cancelling the policy builder workqueue before going into
> suspend and reschedule the workqueue after resume.
>
> [ 629.516792] ccp 0000:c2:00.2: tee: command 0x5 timed out, disabling PSP
> [ 629.516835] amd-pmf AMDI0102:00: TEE enact cmd failed. err: ffff000e, ret:0
> [ 630.550464] amd-pmf AMDI0102:00: AMD_PMF_REGISTER_RESPONSE:1
> [ 630.550511] amd-pmf AMDI0102:00: AMD_PMF_REGISTER_ARGUMENT:7
> [ 630.550548] amd-pmf AMDI0102:00: AMD_PMF_REGISTER_MESSAGE:16
>
> Fixes: ae82cef7d9c5 ("platform/x86/amd/pmf: Add support for PMF-TA interaction")
> Co-developed-by: Patil Rajesh Reddy <Patil.Reddy@amd.com>
> Signed-off-by: Patil Rajesh Reddy <Patil.Reddy@amd.com>
> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Thanks, patch looks good to me:
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Regards,
Hans
> ---
> v2->v3:
> - No change
>
> v1->v2:
> - remove enum smart_pc_status and adjust the code handling
>
> drivers/platform/x86/amd/pmf/core.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/platform/x86/amd/pmf/core.c b/drivers/platform/x86/amd/pmf/core.c
> index 1d6dbd246d65..853158933510 100644
> --- a/drivers/platform/x86/amd/pmf/core.c
> +++ b/drivers/platform/x86/amd/pmf/core.c
> @@ -296,6 +296,9 @@ static int amd_pmf_suspend_handler(struct device *dev)
> {
> struct amd_pmf_dev *pdev = dev_get_drvdata(dev);
>
> + if (pdev->smart_pc_enabled)
> + cancel_delayed_work_sync(&pdev->pb_work);
> +
> kfree(pdev->buf);
>
> return 0;
> @@ -312,6 +315,9 @@ static int amd_pmf_resume_handler(struct device *dev)
> return ret;
> }
>
> + if (pdev->smart_pc_enabled)
> + schedule_delayed_work(&pdev->pb_work, msecs_to_jiffies(2000));
> +
> return 0;
> }
>
next prev parent reply other threads:[~2024-02-18 10:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-16 6:41 [PATCH v3 1/2] platform/x86/amd/pmf: remove smart_pc_status enum Shyam Sundar S K
2024-02-16 6:41 ` [PATCH v3 2/2] platform/x86/amd/pmf: Fix TEE enact command failure after suspend and resume Shyam Sundar S K
2024-02-16 14:26 ` Mario Limonciello
2024-02-18 10:25 ` Hans de Goede [this message]
2024-02-16 14:26 ` [PATCH v3 1/2] platform/x86/amd/pmf: remove smart_pc_status enum Mario Limonciello
2024-02-18 10:24 ` Hans de Goede
2024-02-19 4:20 ` Shyam Sundar S K
2024-02-19 12:30 ` Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2969e76d-1505-4122-959b-ee92b887ea7a@redhat.com \
--to=hdegoede@redhat.com \
--cc=Patil.Reddy@amd.com \
--cc=Shyam-sundar.S-k@amd.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=mario.limonciello@amd.com \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox