bnxt_en: parse result field when NVRAM package install fails
authorKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Sat, 5 Mar 2022 08:54:36 +0000 (03:54 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sat, 5 Mar 2022 11:16:55 +0000 (11:16 +0000)
commit02acd399533e44523cdadb260837f6c53d146f80
tree1fc1248852746ea49bd875ab1ba63d76564c30d5
parent54ff1e3e8fc3aad09d5dfc426bb462e261c37a1b
bnxt_en: parse result field when NVRAM package install fails

Instead of always returning -ENOPKG, decode the firmware error
code further when the HWRM_NVM_INSTALL_UPDATE firmware call fails.
Return a more suitable error code to userspace and log an error
in dmesg.

Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c