summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasundhara Volam <vasundhara-v.volam@broadcom.com>2020-03-09 01:45:53 +0300
committerDavid S. Miller <davem@davemloft.net>2020-03-09 07:54:46 +0300
commit3a707bed13b77dd7773867bee156164d730c24e0 (patch)
treeafd2f2cb934827f1dfdf34a8b1c325d87cbe97d3
parent3d0615911d33b81da64d75031490859b4513a19b (diff)
downloadlinux-3a707bed13b77dd7773867bee156164d730c24e0.tar.xz
bnxt_en: Return -EAGAIN if fw command returns BUSY
If firmware command returns error code as HWRM_ERR_CODE_BUSY, which means it cannot handle the command due to a conflicting command from another function, convert it to -EAGAIN. If it is an ethtool operation, this error code will be returned to userspace. Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/broadcom/bnxt/bnxt.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index e5da60a9b9e6..02ac718db92f 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -4161,6 +4161,7 @@ static int bnxt_hwrm_to_stderr(u32 hwrm_err)
case HWRM_ERR_CODE_NO_BUFFER:
return -ENOMEM;
case HWRM_ERR_CODE_HOT_RESET_PROGRESS:
+ case HWRM_ERR_CODE_BUSY:
return -EAGAIN;
case HWRM_ERR_CODE_CMD_NOT_SUPPORTED:
return -EOPNOTSUPP;