mirror of https://gitee.com/openkylin/linux.git
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@mellanox.com> Cc: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com> Reviewed-by: Michael Chan <michael.chan@broadcom.com> Reviewed-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
b5872cd0e8
commit
9bf88b9fc8
|
@ -411,6 +411,12 @@ 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);
|
||||
|
|
Loading…
Reference in New Issue