[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250717123815.GE27043@horms.kernel.org>
Date: Thu, 17 Jul 2025 13:38:15 +0100
From: Simon Horman <horms@...nel.org>
To: Hariprasad Kelam <hkelam@...vell.com>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org, kuba@...nel.org,
davem@...emloft.net, sgoutham@...vell.com, gakula@...vell.com,
jerinj@...vell.com, lcherian@...vell.com, sbhatta@...vell.com,
naveenm@...vell.com, edumazet@...gle.com, pabeni@...hat.com,
andrew+netdev@...n.ch, bbhushan2@...vell.com
Subject: Re: [net-next 4/4] Octeontx2-af: Debugfs support for firmware data
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@...vell.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
Powered by blists - more mailing lists