public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Cc: jgg@ziepe.ca, linux-rdma@vger.kernel.org,
	andrew.gospodarek@broadcom.com, selvin.xavier@broadcom.com,
	Anantha Prabhu <anantha.prabhu@broadcom.com>,
	Saravanan Vajravel <saravanan.vajravel@broadcom.com>
Subject: Re: [PATCH rdma-next 1/9] RDMA/bnxt_re: Update sysfs entries with appropriate data
Date: Mon, 8 Sep 2025 10:03:02 +0300	[thread overview]
Message-ID: <20250908070302.GC25881@unreal> (raw)
In-Reply-To: <20250814112555.221665-2-kalesh-anakkur.purayil@broadcom.com>

On Thu, Aug 14, 2025 at 04:55:47PM +0530, Kalesh AP wrote:
> From: Anantha Prabhu <anantha.prabhu@broadcom.com>
> 
> Updated the existing sysfs entries with correct data.
> This change is to align the behavior with our OOB driver.
> Added "board_id" sysfs entry which will provide the
> VPD Part number, if exists.
> 
> Signed-off-by: Anantha Prabhu <anantha.prabhu@broadcom.com>
> Signed-off-by: Saravanan Vajravel <saravanan.vajravel@broadcom.com>
> Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
> ---
>  drivers/infiniband/hw/bnxt_re/bnxt_re.h |  2 +
>  drivers/infiniband/hw/bnxt_re/main.c    | 49 ++++++++++++++++++++++++-
>  2 files changed, 49 insertions(+), 2 deletions(-)

<...>

> +static ssize_t board_id_show(struct device *device, struct device_attribute *attr,
> +			     char *buf)
> +{
> +	struct bnxt_re_dev *rdev = rdma_device_to_drv_device(device,
> +							     struct bnxt_re_dev, ibdev);
> +	char buffer[BNXT_VPD_FLD_LEN] = {};
> +
> +	if (!rdev->is_virtfn)
> +		memcpy(buffer, rdev->board_partno, BNXT_VPD_FLD_LEN - 1);
> +	else
> +		scnprintf(buffer, BNXT_VPD_FLD_LEN, "0x%x-VF",
> +			  rdev->en_dev->pdev->device);
> +
> +	return scnprintf(buf, PAGE_SIZE, "%s\n", buffer);

You should use sysfs_emit() here.

> +}
> +static DEVICE_ATTR_RO(board_id);

Thanks

  reply	other threads:[~2025-09-08  7:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-14 11:25 [PATCH rdma-next 0/9] bnxt_re enhancements Kalesh AP
2025-08-14 11:25 ` [PATCH rdma-next 1/9] RDMA/bnxt_re: Update sysfs entries with appropriate data Kalesh AP
2025-09-08  7:03   ` Leon Romanovsky [this message]
2025-08-14 11:25 ` [PATCH rdma-next 2/9] RDMA/bnxt_re: show srq_limit in fill_res_srq_entry hook Kalesh AP
2025-08-14 11:25 ` [PATCH rdma-next 3/9] RDMA/bnxt_re: RoCE Driver Dynamic Debug for HWRM's Kalesh AP
2025-08-14 11:25 ` [PATCH rdma-next 4/9] RDMA/bnxt_re: Avoid GID level QoS update from the driver Kalesh AP
2025-09-08  7:04   ` Leon Romanovsky
2025-08-14 11:25 ` [PATCH rdma-next 5/9] RDMA/bnxt_re: Optimize bnxt_qplib_get_dev_attr function Kalesh AP
2025-08-14 11:25 ` [PATCH rdma-next 6/9] RDMA/bnxt_re: RoCE related hardware counters update Kalesh AP
2025-08-14 11:25 ` [PATCH rdma-next 7/9] RDMA/bnxt_re: Report udp source port for flow_label in bnxt_re_query_qp Kalesh AP
2025-08-14 11:25 ` [PATCH rdma-next 8/9] RDMA/bnxt_re: Delete always true SGID table check Kalesh AP
2025-08-14 11:25 ` [PATCH rdma-next 9/9] RDMA/bnxt_re: Enhance a log message when bnxt_re_register_netdev fails Kalesh AP
2025-09-08  7:10 ` [PATCH rdma-next 0/9] bnxt_re enhancements Leon Romanovsky
2025-09-08  7:38   ` Kalesh Anakkur Purayil

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=20250908070302.GC25881@unreal \
    --to=leon@kernel.org \
    --cc=anantha.prabhu@broadcom.com \
    --cc=andrew.gospodarek@broadcom.com \
    --cc=jgg@ziepe.ca \
    --cc=kalesh-anakkur.purayil@broadcom.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=saravanan.vajravel@broadcom.com \
    --cc=selvin.xavier@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