[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1592640947-10421-3-git-send-email-vasundhara-v.volam@broadcom.com>
Date: Sat, 20 Jun 2020 13:45:47 +0530
From: Vasundhara Volam <vasundhara-v.volam@...adcom.com>
To: davem@...emloft.net
Cc: netdev@...r.kernel.org, michael.chan@...adcom.com, kuba@...nel.org,
jiri@...lanox.com, jacob.e.keller@...el.com,
Vasundhara Volam <vasundhara-v.volam@...adcom.com>
Subject: [PATCH net-next 2/2] bnxt_en: Add board_serial_number field to info_get cb
Add board_serial_number field info to info_get cb via devlink,
if driver can fetch the information from the device.
Cc: Jiri Pirko <jiri@...lanox.com>
Cc: Jakub Kicinski <kuba@...nel.org>
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@...adcom.com>
Reviewed-by: Michael Chan <michael.chan@...adcom.com>
---
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
index a812beb..16eca3b 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
@@ -411,6 +411,13 @@ static int bnxt_dl_info_get(struct devlink *dl, struct devlink_info_req *req,
return rc;
}
+ if (strlen(bp->board_serialno)) {
+ rc = devlink_info_board_serial_number_put(req,
+ bp->board_serialno);
+ if (rc)
+ return rc;
+ }
+
sprintf(buf, "%X", bp->chip_num);
rc = devlink_info_version_fixed_put(req,
DEVLINK_INFO_VERSION_GENERIC_ASIC_ID, buf);
--
1.8.3.1
Powered by blists - more mailing lists