diff options
author | Vasundhara Volam <vasundhara-v.volam@broadcom.com> | 2020-06-20 18:31:56 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-06-23 01:15:04 +0200 |
commit | b5872cd0e823e4cb50b3a75cd9522167eeb676a2 (patch) | |
tree | 1dbe79bf810e1b5b4471379fc5cf58662b427125 /net | |
parent | Merge branch 'Cosmetic-cleanup-in-SJA1105-DSA-driver' (diff) | |
download | linux-b5872cd0e823e4cb50b3a75cd9522167eeb676a2.tar.xz linux-b5872cd0e823e4cb50b3a75cd9522167eeb676a2.zip |
devlink: Add support for board.serial_number to info_get cb.
Board serial number is a serial number, often available in PCI
*Vital Product Data*.
Also, update devlink-info.rst documentation file.
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/devlink.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/core/devlink.c b/net/core/devlink.c index baa45eca6b5a..455998a57671 100644 --- a/net/core/devlink.c +++ b/net/core/devlink.c @@ -4502,6 +4502,14 @@ int devlink_info_serial_number_put(struct devlink_info_req *req, const char *sn) } EXPORT_SYMBOL_GPL(devlink_info_serial_number_put); +int devlink_info_board_serial_number_put(struct devlink_info_req *req, + const char *bsn) +{ + return nla_put_string(req->msg, DEVLINK_ATTR_INFO_BOARD_SERIAL_NUMBER, + bsn); +} +EXPORT_SYMBOL_GPL(devlink_info_board_serial_number_put); + static int devlink_info_version_put(struct devlink_info_req *req, int attr, const char *version_name, const char *version_value) |