Skip to content

Commit b703ba7

Browse files
Vasundhara Volamdavem330
authored andcommitted
bnxt_en: Suppress HWRM errors for HWRM_NVM_GET_VARIABLE command
For newly added NVM parameters, older firmware may not have the support. Suppress the error message to avoid the unncessary error message which is triggered when devlink calls the driver during initialization. Fixes: 782a624 ("bnxt_en: Add bnxt_en initial params table and register it.") Signed-off-by: Vasundhara Volam <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent dd2ebf3 commit b703ba7

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,13 @@ static int bnxt_hwrm_nvm_req(struct bnxt *bp, u32 param_id, void *msg,
9898
if (idx)
9999
req->dimensions = cpu_to_le16(1);
100100

101-
if (req->req_type == cpu_to_le16(HWRM_NVM_SET_VARIABLE))
101+
if (req->req_type == cpu_to_le16(HWRM_NVM_SET_VARIABLE)) {
102102
memcpy(data_addr, buf, bytesize);
103-
104-
rc = hwrm_send_message(bp, msg, msg_len, HWRM_CMD_TIMEOUT);
103+
rc = hwrm_send_message(bp, msg, msg_len, HWRM_CMD_TIMEOUT);
104+
} else {
105+
rc = hwrm_send_message_silent(bp, msg, msg_len,
106+
HWRM_CMD_TIMEOUT);
107+
}
105108
if (!rc && req->req_type == cpu_to_le16(HWRM_NVM_GET_VARIABLE))
106109
memcpy(buf, data_addr, bytesize);
107110

0 commit comments

Comments
 (0)