From: Jiri Pirko <jiri@resnulli.us>
To: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
michael.chan@broadcom.com, kuba@kernel.org, jiri@mellanox.com,
jacob.e.keller@intel.com
Subject: Re: [PATCH net-next 2/2] bnxt_en: Add board_serial_number field to info_get cb
Date: Sat, 20 Jun 2020 15:07:24 +0200 [thread overview]
Message-ID: <20200620130724.GC2748@nanopsycho> (raw)
In-Reply-To: <1592640947-10421-3-git-send-email-vasundhara-v.volam@broadcom.com>
Sat, Jun 20, 2020 at 10:15:47AM CEST, vasundhara-v.volam@broadcom.com wrote:
>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>
>---
> drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
>diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
>index a812beb..16eca3b 100644
>--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
>+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
>@@ -411,6 +411,13 @@ 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,
No need for linebreak here.
>+ 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);
>--
>1.8.3.1
>
next prev parent reply other threads:[~2020-06-20 13:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-20 8:15 [PATCH net-next 0/2] devlink: Add board_serial_number field to info_get cb Vasundhara Volam
2020-06-20 8:15 ` [PATCH net-next 1/2] devlink: Add support for board_serial_number " Vasundhara Volam
2020-06-20 13:06 ` Jiri Pirko
2020-06-20 8:15 ` [PATCH net-next 2/2] bnxt_en: Add board_serial_number field " Vasundhara Volam
2020-06-20 13:07 ` Jiri Pirko [this message]
2020-06-20 16:19 ` Vasundhara Volam
2020-06-20 12:09 ` [PATCH net-next 0/2] devlink: " Jiri Pirko
2020-06-20 16:17 ` Vasundhara Volam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200620130724.GC2748@nanopsycho \
--to=jiri@resnulli.us \
--cc=davem@davemloft.net \
--cc=jacob.e.keller@intel.com \
--cc=jiri@mellanox.com \
--cc=kuba@kernel.org \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=vasundhara-v.volam@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).