RDMA/bnxt_re: Return more meaningful error
authorKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Tue, 8 Oct 2024 07:41:36 +0000 (00:41 -0700)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 11 Oct 2024 23:49:01 +0000 (20:49 -0300)
When the HWRM command fails, driver currently returns -EFAULT(Bad
address). This does not look correct.

Modified to return -EIO(I/O error).

Fixes: cc1ec769b87c ("RDMA/bnxt_re: Fixing the Control path command and response handling")
Fixes: 65288a22ddd8 ("RDMA/bnxt_re: use shadow qd while posting non blocking rcfw command")
Link: https://patch.msgid.link/r/1728373302-19530-5-git-send-email-selvin.xavier@broadcom.com
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c

index 3ffaef0..7294221 100644 (file)
@@ -525,7 +525,7 @@ static int __bnxt_qplib_rcfw_send_message(struct bnxt_qplib_rcfw *rcfw,
                /* failed with status */
                dev_err(&rcfw->pdev->dev, "cmdq[%#x]=%#x status %#x\n",
                        cookie, opcode, evnt->status);
-               rc = -EFAULT;
+               rc = -EIO;
        }
 
        return rc;