diff options
author | Davidlohr Bueso <dave@stgolabs.net> | 2022-04-04 04:12:16 +0200 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2022-04-13 01:07:02 +0200 |
commit | c43e036d6f861f4c68b50eea49ab55b539eaab02 (patch) | |
tree | cf4bf5fb102a9302530a86938c21f30247445c40 /drivers/cxl/pci.c | |
parent | cxl/mbox: Improve handling of mbox_cmd hw return codes (diff) | |
download | linux-c43e036d6f861f4c68b50eea49ab55b539eaab02.tar.xz linux-c43e036d6f861f4c68b50eea49ab55b539eaab02.zip |
cxl/mbox: Use new return_code handling
Use the global cxl_mbox_cmd_rc table to improve debug messaging
in __cxl_pci_mbox_send_cmd() and allow cxl_mbox_send_cmd()
to map to proper kernel style errno codes - this patch
continues to use -ENXIO only so no change in semantics.
Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
Reviewed by: Adam Manzanares <a.manzanares@samsung.com>
Link: https://lore.kernel.org/r/20220404021216.66841-5-dave@stgolabs.net
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/cxl/pci.c')
-rw-r--r-- | drivers/cxl/pci.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c index 88fcd6cc38a3..39694cc63381 100644 --- a/drivers/cxl/pci.c +++ b/drivers/cxl/pci.c @@ -178,7 +178,8 @@ static int __cxl_pci_mbox_send_cmd(struct cxl_dev_state *cxlds, FIELD_GET(CXLDEV_MBOX_STATUS_RET_CODE_MASK, status_reg); if (mbox_cmd->return_code != CXL_MBOX_CMD_RC_SUCCESS) { - dev_dbg(dev, "Mailbox operation had an error\n"); + dev_dbg(dev, "Mailbox operation had an error: %s\n", + cxl_mbox_cmd_rc2str(mbox_cmd)); return 0; /* completed but caller must check return_code */ } |