From: Simon Horman <horms@kernel.org>
To: Hariprasad Kelam <hkelam@marvell.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
kuba@kernel.org, davem@davemloft.net, sgoutham@marvell.com,
gakula@marvell.com, jerinj@marvell.com, lcherian@marvell.com,
sbhatta@marvell.com, naveenm@marvell.com, edumazet@google.com,
pabeni@redhat.com, andrew+netdev@lunn.ch, bbhushan2@marvell.com
Subject: Re: [net-next 4/4] Octeontx2-af: Debugfs support for firmware data
Date: Thu, 17 Jul 2025 13:38:15 +0100 [thread overview]
Message-ID: <20250717123815.GE27043@horms.kernel.org> (raw)
In-Reply-To: <20250716164158.1537269-5-hkelam@marvell.com>
On Wed, Jul 16, 2025 at 10:11:58PM +0530, Hariprasad Kelam wrote:
> MAC address, Link modes (supported and advertised) and eeprom data
> for the Netdev interface are read from the shared firmware data.
> This patch adds debugfs support for the same.
>
> Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
> ---
> .../net/ethernet/marvell/octeontx2/af/mbox.h | 7 +-
> .../marvell/octeontx2/af/rvu_debugfs.c | 148 ++++++++++++++++++
> 2 files changed, 154 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/mbox.h b/drivers/net/ethernet/marvell/octeontx2/af/mbox.h
> index 0bc0dc79868b..933073cd2280 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/af/mbox.h
> +++ b/drivers/net/ethernet/marvell/octeontx2/af/mbox.h
> @@ -664,7 +664,12 @@ struct cgx_lmac_fwdata_s {
> /* Only applicable if SFP/QSFP slot is present */
> struct sfp_eeprom_s sfp_eeprom;
> struct phy_s phy;
> -#define LMAC_FWDATA_RESERVED_MEM 1021
> + u32 lmac_type;
> + u32 portm_idx;
> + u64 mgmt_port:1;
> + u64 advertised_an:1;
> + u64 port;
> +#define LMAC_FWDATA_RESERVED_MEM 1018
> u64 reserved[LMAC_FWDATA_RESERVED_MEM];
> };
>
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
> index 0c20642f81b9..900bd1ae240d 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
> @@ -867,6 +867,65 @@ static int rvu_dbg_rvu_pf_cgx_map_display(struct seq_file *filp, void *unused)
>
> RVU_DEBUG_SEQ_FOPS(rvu_pf_cgx_map, rvu_pf_cgx_map_display, NULL);
>
> +static int rvu_dbg_rvu_fwdata_display(struct seq_file *s, void *unused)
> +{
> + struct rvu *rvu = s->private;
> + struct rvu_fwdata *fwdata;
> + u8 mac[ETH_ALEN];
> + int count = 0, i;
> +
> + if (!rvu->fwdata)
> + return -EAGAIN;
> +
> + fwdata = rvu->fwdata;
> + seq_puts(s, "\nRVU Firmware Data:\n");
> + seq_puts(s, "\n\t\tPTP INFORMATION\n");
> + seq_puts(s, "\t\t===============\n");
> + seq_printf(s, "\t\texternal clockrate \t :%x\n", fwdata->ptp_ext_clk_rate);
Please line wrap to 80 columns wide or less.
Likewise elsewhere in this patch.
> + seq_printf(s, "\t\texternal timestamp \t :%x\n", fwdata->ptp_ext_tstamp);
> + seq_puts(s, "\n");
> +
> + seq_puts(s, "\n\t\tSDP CHANNEL INFORMATION\n");
> + seq_puts(s, "\t\t=======================\n");
> + seq_printf(s, "\t\tValid \t\t\t :%x\n", fwdata->channel_data.valid);
> + seq_printf(s, "\t\tNode ID \t\t :%x\n", fwdata->channel_data.info.node_id);
> + seq_printf(s, "\t\tNumner of VFs \t\t :%x\n", fwdata->channel_data.info.max_vfs);
> + seq_printf(s, "\t\tNumber of PF-Rings \t :%x\n", fwdata->channel_data.info.num_pf_rings);
> + seq_printf(s, "\t\tPF SRN \t\t\t :%x\n", fwdata->channel_data.info.pf_srn);
> + seq_puts(s, "\n");
...
--
pw-bot: changes-requested
prev parent reply other threads:[~2025-07-17 12:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-16 16:41 [net-next 0/4] Octeontx2-af: RPM: misc feaures Hariprasad Kelam
2025-07-16 16:41 ` [net-next 1/4] Octeontx2-af: Add programmed macaddr to RVU pfvf Hariprasad Kelam
2025-07-17 12:31 ` Simon Horman
2025-07-16 16:41 ` [net-next 2/4] Octeontx2-af: Disable stale DMAC filters Hariprasad Kelam
2025-07-17 12:33 ` Simon Horman
2025-07-16 16:41 ` [net-next 3/4] Octeontx2-af: RPM: Update DMA mask Hariprasad Kelam
2025-07-17 12:35 ` Simon Horman
2025-07-16 16:41 ` [net-next 4/4] Octeontx2-af: Debugfs support for firmware data Hariprasad Kelam
2025-07-16 17:26 ` ALOK TIWARI
2025-07-17 12:38 ` Simon Horman [this message]
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=20250717123815.GE27043@horms.kernel.org \
--to=horms@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=bbhushan2@marvell.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gakula@marvell.com \
--cc=hkelam@marvell.com \
--cc=jerinj@marvell.com \
--cc=kuba@kernel.org \
--cc=lcherian@marvell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=naveenm@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sbhatta@marvell.com \
--cc=sgoutham@marvell.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).