From: Simon Horman <horms@kernel.org>
To: MD Danish Anwar <danishanwar@ti.com>
Cc: Dan Carpenter <dan.carpenter@linaro.org>,
Diogo Ivo <diogo.ivo@siemens.com>,
Jan Kiszka <jan.kiszka@siemens.com>, Andrew Lunn <andrew@lunn.ch>,
Paolo Abeni <pabeni@redhat.com>, Jakub Kicinski <kuba@kernel.org>,
Eric Dumazet <edumazet@google.com>,
"David S. Miller" <davem@davemloft.net>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, srk@ti.com,
Vignesh Raghavendra <vigneshr@ti.com>,
r-gunasekaran@ti.com, Roger Quadros <rogerq@kernel.org>
Subject: Re: [RFC PATCH net-next 2/2] net: ti: icssg-prueth: Add multicast filtering support
Date: Thu, 30 May 2024 20:08:25 +0100 [thread overview]
Message-ID: <20240530190825.GC123401@kernel.org> (raw)
In-Reply-To: <20240516091752.2969092-3-danishanwar@ti.com>
On Thu, May 16, 2024 at 02:47:52PM +0530, MD Danish Anwar wrote:
> Add multicast filtering support for ICSSG Driver.
>
> Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
> ---
> drivers/net/ethernet/ti/icssg/icssg_config.c | 16 +++++--
> drivers/net/ethernet/ti/icssg/icssg_prueth.c | 50 ++++++++++++++++++--
> drivers/net/ethernet/ti/icssg/icssg_prueth.h | 3 ++
> 3 files changed, 62 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/ethernet/ti/icssg/icssg_config.c b/drivers/net/ethernet/ti/icssg/icssg_config.c
> index 2213374d4d45..4e30bb995078 100644
> --- a/drivers/net/ethernet/ti/icssg/icssg_config.c
> +++ b/drivers/net/ethernet/ti/icssg/icssg_config.c
> @@ -318,17 +318,27 @@ static int prueth_emac_buffer_setup(struct prueth_emac *emac)
>
> static void icssg_init_emac_mode(struct prueth *prueth)
> {
> + u32 addr = prueth->shram.pa + VLAN_STATIC_REG_TABLE_OFFSET;
> /* When the device is configured as a bridge and it is being brought
> * back to the emac mode, the host mac address has to be set as 0.
> */
> u8 mac[ETH_ALEN] = { 0 };
> + int i;
>
> if (prueth->emacs_initialized)
> return;
>
> - regmap_update_bits(prueth->miig_rt, FDB_GEN_CFG1,
> - SMEM_VLAN_OFFSET_MASK, 0);
> - regmap_write(prueth->miig_rt, FDB_GEN_CFG2, 0);
> + /* Set VLAN TABLE address base */
> + regmap_update_bits(prueth->miig_rt, FDB_GEN_CFG1, SMEM_VLAN_OFFSET_MASK,
> + addr << SMEM_VLAN_OFFSET);
> + /* Configure CFG2 register */
> + regmap_write(prueth->miig_rt, FDB_GEN_CFG2, (FDB_PRU0_EN | FDB_PRU1_EN | FDB_HOST_EN));
> +
> + prueth->vlan_tbl = prueth->shram.va + VLAN_STATIC_REG_TABLE_OFFSET;
> + for (i = 0; i < SZ_4K - 1; i++) {
> + prueth->vlan_tbl[i].fid = i;
> + prueth->vlan_tbl[i].fid_c1 = 0;
> + }
Hi MD,
This isnot a full review, but I did notice one thing.
According to Sparse, prueth->shram.va is __iomem.
I don't think it is portable to directly access __iomem like this.
Rather, I suspect that either ioremap(), or writel() or similar should be used.
> /* Clear host MAC address */
> icssg_class_set_host_mac_addr(prueth->miig_rt, mac);
> }
...
prev parent reply other threads:[~2024-05-30 19:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-16 9:17 [RFC PATCH net-next 0/2] Add multicast filtering support for ICSSG driver MD Danish Anwar
2024-05-16 9:17 ` [RFC PATCH net-next 1/2] net: ti: icssg-prueth: Add helper functions to configure FDB MD Danish Anwar
2024-05-16 9:17 ` [RFC PATCH net-next 2/2] net: ti: icssg-prueth: Add multicast filtering support MD Danish Anwar
2024-05-30 19:08 ` 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=20240530190825.GC123401@kernel.org \
--to=horms@kernel.org \
--cc=andrew@lunn.ch \
--cc=dan.carpenter@linaro.org \
--cc=danishanwar@ti.com \
--cc=davem@davemloft.net \
--cc=diogo.ivo@siemens.com \
--cc=edumazet@google.com \
--cc=jan.kiszka@siemens.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=r-gunasekaran@ti.com \
--cc=rogerq@kernel.org \
--cc=srk@ti.com \
--cc=vigneshr@ti.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).