Skip to content

Commit 56d69c7

Browse files
Vasundhara Volamdavem330
authored andcommitted
bnxt_en: Add partno to devlink info_get cb
Add part number info from the vital product data to info_get command via devlink tool. Update bnxt.rst documentation as well. Cc: Jakub Kicinski <[email protected]> Signed-off-by: Vasundhara Volam <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent a0d0fd7 commit 56d69c7

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

Documentation/networking/devlink/bnxt.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ The ``bnxt_en`` driver reports the following versions
5151
* - Name
5252
- Type
5353
- Description
54+
* - ``board.id``
55+
- fixed
56+
- Part number identifying the board design
5457
* - ``asic.id``
5558
- fixed
5659
- ASIC design identifier

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,14 @@ static int bnxt_dl_info_get(struct devlink *dl, struct devlink_info_req *req,
403403
if (rc)
404404
return rc;
405405

406+
if (strlen(bp->board_partno)) {
407+
rc = devlink_info_version_fixed_put(req,
408+
DEVLINK_INFO_VERSION_GENERIC_BOARD_ID,
409+
bp->board_partno);
410+
if (rc)
411+
return rc;
412+
}
413+
406414
sprintf(buf, "%X", bp->chip_num);
407415
rc = devlink_info_version_fixed_put(req,
408416
DEVLINK_INFO_VERSION_GENERIC_ASIC_ID, buf);

0 commit comments

Comments
 (0)