diff options
author | Vasundhara Volam <vasundhara-v.volam@broadcom.com> | 2020-03-27 12:35:50 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-03-28 01:34:42 +0300 |
commit | 56d69c784d36bee693e950de37fe1751e99fda57 (patch) | |
tree | 740a5e2e81d16d0228e721e93a84a9c7268d83b2 /drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | |
parent | a0d0fd70fed5cc4f1e2dd98b801be63b07b4d6ac (diff) | |
download | linux-56d69c784d36bee693e950de37fe1751e99fda57.tar.xz |
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>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c index 39c2ac4ecc4e..0c8283b9bafe 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c @@ -403,6 +403,14 @@ static int bnxt_dl_info_get(struct devlink *dl, struct devlink_info_req *req, if (rc) return rc; + if (strlen(bp->board_partno)) { + rc = devlink_info_version_fixed_put(req, + DEVLINK_INFO_VERSION_GENERIC_BOARD_ID, + bp->board_partno); + if (rc) + return rc; + } + sprintf(buf, "%X", bp->chip_num); rc = devlink_info_version_fixed_put(req, DEVLINK_INFO_VERSION_GENERIC_ASIC_ID, buf); |