Message ID | 20250217064937.98702-1-Shyam-sundar.S-k@amd.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [1/2] platform/x86/amd/pmf: Propagate PMF-TA return codes | expand |
On 2/17/2025 00:49, Shyam Sundar S K wrote: > In the amd_pmf_invoke_cmd_init() function within the PMF driver ensure > that the actual result from the PMF-TA is returned rather than a generic > EIO. This change allows for proper handling of errors originating from the > PMF-TA. > > 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> > --- Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> > drivers/platform/x86/amd/pmf/tee-if.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/platform/x86/amd/pmf/tee-if.c b/drivers/platform/x86/amd/pmf/tee-if.c > index 8c88769ea1d8..b404764550c4 100644 > --- a/drivers/platform/x86/amd/pmf/tee-if.c > +++ b/drivers/platform/x86/amd/pmf/tee-if.c > @@ -323,7 +323,7 @@ static int amd_pmf_start_policy_engine(struct amd_pmf_dev *dev) > } else { > dev_err(dev->dev, "ta invoke cmd init failed err: %x\n", res); > dev->smart_pc_enabled = false; > - return -EIO; > + return res; > } > > return 0;
diff --git a/drivers/platform/x86/amd/pmf/tee-if.c b/drivers/platform/x86/amd/pmf/tee-if.c index 8c88769ea1d8..b404764550c4 100644 --- a/drivers/platform/x86/amd/pmf/tee-if.c +++ b/drivers/platform/x86/amd/pmf/tee-if.c @@ -323,7 +323,7 @@ static int amd_pmf_start_policy_engine(struct amd_pmf_dev *dev) } else { dev_err(dev->dev, "ta invoke cmd init failed err: %x\n", res); dev->smart_pc_enabled = false; - return -EIO; + return res; } return 0;