Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <kuba@kernel.org>
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Vasundhara Volam and committed by
David S. Miller
56d69c78 a0d0fd70

+11
+3
Documentation/networking/devlink/bnxt.rst
··· 51 51 * - Name 52 52 - Type 53 53 - Description 54 + * - ``board.id`` 55 + - fixed 56 + - Part number identifying the board design 54 57 * - ``asic.id`` 55 58 - fixed 56 59 - ASIC design identifier
+8
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
··· 403 403 if (rc) 404 404 return rc; 405 405 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 + 406 414 sprintf(buf, "%X", bp->chip_num); 407 415 rc = devlink_info_version_fixed_put(req, 408 416 DEVLINK_INFO_VERSION_GENERIC_ASIC_ID, buf);