From befaad00d846a0d60e0f997d913e64a67fe79b66 Mon Sep 17 00:00:00 2001 From: Jonathan Toppins Date: Wed, 2 Oct 2019 18:22:54 -0400 Subject: [PATCH 39/96] [netdrv] bnxt_en: Suppress HWRM errors for HWRM_NVM_GET_VARIABLE command Message-id: <3f152c462aacd24f8159b158cf6d29d8089a1b6e.1570027456.git.jtoppins@redhat.com> Patchwork-id: 276459 O-Subject: [RHEL-8.2 PATCH 32/78] bnxt_en: Suppress HWRM errors for HWRM_NVM_GET_VARIABLE command Bugzilla: 1724766 RH-Acked-by: John Linville RH-Acked-by: Jarod Wilson 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: 782a624d00fa ("bnxt_en: Add bnxt_en initial params table and register it.") Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller (cherry picked from commit b703ba751dbb4bcd086509ed4b28102bc1670b35) Bugzilla: 1724766 Build Info: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=23809532 Tested: build, boot, basic ping Signed-off-by: Jonathan Toppins Signed-off-by: Bruno Meneguele --- drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) Index: src/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c =================================================================== --- src.orig/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c 2020-02-06 16:23:12.277544664 +0100 +++ src/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c 2020-02-06 16:23:15.606514107 +0100 @@ -98,10 +98,13 @@ if (idx) req->dimensions = cpu_to_le16(1); - if (req->req_type == cpu_to_le16(HWRM_NVM_SET_VARIABLE)) + if (req->req_type == cpu_to_le16(HWRM_NVM_SET_VARIABLE)) { memcpy(data_addr, buf, bytesize); - - rc = hwrm_send_message(bp, msg, msg_len, HWRM_CMD_TIMEOUT); + rc = hwrm_send_message(bp, msg, msg_len, HWRM_CMD_TIMEOUT); + } else { + rc = hwrm_send_message_silent(bp, msg, msg_len, + HWRM_CMD_TIMEOUT); + } if (!rc && req->req_type == cpu_to_le16(HWRM_NVM_GET_VARIABLE)) memcpy(buf, data_addr, bytesize);