mirror of
https://github.com/torvalds/linux.git
synced 2026-09-14 16:10:02 +02:00
pds_core: add support for quiet devcmd failures
Currently there aren't any use-cases that require special handling on whether or not to print devcmd failures. Specifically non-generic failures, i.e. not supported failures. Add support to allow these messages to be suppressed. This will be used when adding support to negotiate PDS_CORE_IDENTITY_VERSION_2. Signed-off-by: Brett Creeley <brett.creeley@amd.com> Link: https://patch.msgid.link/20260730-upstream_v8-v12-1-136cd174ee85@amd.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
2bb824660e
commit
4b5137bfc0
|
|
@ -126,7 +126,8 @@ static const char *pdsc_devcmd_str(int opcode)
|
|||
}
|
||||
}
|
||||
|
||||
static int pdsc_devcmd_wait(struct pdsc *pdsc, u8 opcode, int max_seconds)
|
||||
static int __pdsc_devcmd_wait(struct pdsc *pdsc, u8 opcode, int max_seconds,
|
||||
const bool do_msg)
|
||||
{
|
||||
struct device *dev = pdsc->dev;
|
||||
unsigned long start_time;
|
||||
|
|
@ -179,7 +180,7 @@ static int pdsc_devcmd_wait(struct pdsc *pdsc, u8 opcode, int max_seconds)
|
|||
|
||||
status = pdsc_devcmd_status(pdsc);
|
||||
err = pdsc_err_to_errno(status);
|
||||
if (err && err != -EAGAIN)
|
||||
if (do_msg && err && err != -EAGAIN)
|
||||
dev_err(dev, "DEVCMD %d %s failed, status=%d err %d %pe\n",
|
||||
opcode, pdsc_devcmd_str(opcode), status, err,
|
||||
ERR_PTR(err));
|
||||
|
|
@ -187,8 +188,9 @@ static int pdsc_devcmd_wait(struct pdsc *pdsc, u8 opcode, int max_seconds)
|
|||
return err;
|
||||
}
|
||||
|
||||
int pdsc_devcmd_locked(struct pdsc *pdsc, union pds_core_dev_cmd *cmd,
|
||||
union pds_core_dev_comp *comp, int max_seconds)
|
||||
static int __pdsc_devcmd_locked(struct pdsc *pdsc, union pds_core_dev_cmd *cmd,
|
||||
union pds_core_dev_comp *comp, int max_seconds,
|
||||
const bool do_msg)
|
||||
{
|
||||
int err;
|
||||
|
||||
|
|
@ -197,7 +199,7 @@ int pdsc_devcmd_locked(struct pdsc *pdsc, union pds_core_dev_cmd *cmd,
|
|||
|
||||
memcpy_toio(&pdsc->cmd_regs->cmd, cmd, sizeof(*cmd));
|
||||
pdsc_devcmd_dbell(pdsc);
|
||||
err = pdsc_devcmd_wait(pdsc, cmd->opcode, max_seconds);
|
||||
err = __pdsc_devcmd_wait(pdsc, cmd->opcode, max_seconds, do_msg);
|
||||
|
||||
if ((err == -ENXIO || err == -ETIMEDOUT) && pdsc->wq)
|
||||
queue_work(pdsc->wq, &pdsc->health_work);
|
||||
|
|
@ -207,6 +209,12 @@ int pdsc_devcmd_locked(struct pdsc *pdsc, union pds_core_dev_cmd *cmd,
|
|||
return err;
|
||||
}
|
||||
|
||||
int pdsc_devcmd_locked(struct pdsc *pdsc, union pds_core_dev_cmd *cmd,
|
||||
union pds_core_dev_comp *comp, int max_seconds)
|
||||
{
|
||||
return __pdsc_devcmd_locked(pdsc, cmd, comp, max_seconds, true);
|
||||
}
|
||||
|
||||
int pdsc_devcmd(struct pdsc *pdsc, union pds_core_dev_cmd *cmd,
|
||||
union pds_core_dev_comp *comp, int max_seconds)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user