Commit 3a707bed authored by Vasundhara Volam's avatar Vasundhara Volam Committed by David S. Miller
Browse files

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: default avatarVasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3d061591
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;