cxl/pci: Use CXL_MBOX_SUCCESS to check against mbox_cmd return code
Also mention the need for the caller to check against any errors from the hardware in return_code. Signed-off-by: Davidlohr Bueso <dave@stgolabs.net> Reviewed by: Adam Manzanares <a.manzanares@samsung.com> Link: https://lore.kernel.org/r/20220404021216.66841-3-dave@stgolabs.net Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
parent
ee92c7e261
commit
cbe83a2052
|
@ -177,9 +177,9 @@ static int __cxl_pci_mbox_send_cmd(struct cxl_dev_state *cxlds,
|
|||
mbox_cmd->return_code =
|
||||
FIELD_GET(CXLDEV_MBOX_STATUS_RET_CODE_MASK, status_reg);
|
||||
|
||||
if (mbox_cmd->return_code != 0) {
|
||||
if (mbox_cmd->return_code != CXL_MBOX_SUCCESS) {
|
||||
dev_dbg(dev, "Mailbox operation had an error\n");
|
||||
return 0;
|
||||
return 0; /* completed but caller must check return_code */
|
||||
}
|
||||
|
||||
/* #7 */
|
||||
|
|
Loading…
Reference in New Issue