diff options
author | Vasundhara Volam <vasundhara-v.volam@broadcom.com> | 2020-11-15 19:27:52 -0500 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-11-16 17:39:47 -0800 |
commit | 0ae0a779efb8840a0cdb2d6bd9a5d07663ac3ee2 (patch) | |
tree | 251895e2aef16d0a9e6be148b8ff402e391fa25b | |
parent | fa97f303fa4cf8469fd3d1ef29da69c0a3f6ddc8 (diff) | |
download | linux-0ae0a779efb8840a0cdb2d6bd9a5d07663ac3ee2.tar.bz2 |
bnxt_en: Avoid unnecessary NVM_GET_DEV_INFO cmd error log on VFs.
VFs do not have access permissions to issue NVM_GET_DEV_INFO
firmware command.
Fixes: 4933f6753b50 ("bnxt_en: Add bnxt_hwrm_nvm_get_dev_info() to query NVM info.")
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r-- | drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c index f133ea5674cb..1471c9a36238 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c @@ -2079,6 +2079,9 @@ int bnxt_hwrm_nvm_get_dev_info(struct bnxt *bp, struct hwrm_nvm_get_dev_info_input req = {0}; int rc; + if (BNXT_VF(bp)) + return -EOPNOTSUPP; + bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_NVM_GET_DEV_INFO, -1, -1); mutex_lock(&bp->hwrm_cmd_lock); rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); |