[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <179725937.1046.1760615726437.JavaMail.zimbra@couthit.local>
Date: Thu, 16 Oct 2025 17:25:26 +0530 (IST)
From: Parvathi Pudi <parvathi@...thit.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: parvathi <parvathi@...thit.com>, andrew+netdev <andrew+netdev@...n.ch>,
davem <davem@...emloft.net>, edumazet <edumazet@...gle.com>,
kuba <kuba@...nel.org>, pabeni <pabeni@...hat.com>,
danishanwar <danishanwar@...com>, rogerq <rogerq@...nel.org>,
pmohan <pmohan@...thit.com>, basharath <basharath@...thit.com>,
afd <afd@...com>, linux-kernel <linux-kernel@...r.kernel.org>,
netdev <netdev@...r.kernel.org>,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
pratheesh <pratheesh@...com>, Prajith Jayarajan <prajith@...com>,
Vignesh Raghavendra <vigneshr@...com>, praneeth <praneeth@...com>,
srk <srk@...com>, rogerq <rogerq@...com>,
krishna <krishna@...thit.com>, mohan <mohan@...thit.com>
Subject: Re: [PATCH net-next v3 2/3] net: ti: icssm-prueth: Adds switchdev
support for icssm_prueth driver
Hi,
>> +static struct prueth_fw_offsets fw_offsets_v2_1;
>> +
>> +static void icssm_prueth_set_fw_offsets(struct prueth *prueth)
>> +{
>> + /* Set VLAN/Multicast filter control and table offsets */
>> + if (PRUETH_IS_EMAC(prueth)) {
>> + prueth->fw_offsets->mc_ctrl_byte =
>> + ICSS_EMAC_FW_MULTICAST_FILTER_CTRL_OFFSET;
>> + prueth->fw_offsets->mc_filter_mask =
>> + ICSS_EMAC_FW_MULTICAST_FILTER_MASK_OFFSET;
>> + prueth->fw_offsets->mc_filter_tbl =
>> + ICSS_EMAC_FW_MULTICAST_FILTER_TABLE;
>
> I know for some of these SoCs, there can be multiple instances of the
> hardware blocks. It looks like that will go wrong here, because there
> is only one fw_offsets_v2_1 ?
>
> Humm, actually, if this are constant, why have fw_offsets_v2_1? Just
> use ICSS_EMAC_FW_MULTICAST_FILTER_CTRL_OFFSET directly?
>
Sure we will evaluate this and address in the next version.
>> +static void icssm_emac_mc_filter_ctrl(struct prueth_emac *emac, bool enable)
>> +{
>> + struct prueth *prueth = emac->prueth;
>> + void __iomem *mc_filter_ctrl;
>> + void __iomem *ram;
>> + u32 mc_ctrl_byte;
>> + u32 reg;
>> +
>> + ram = prueth->mem[emac->dram].va;
>> + mc_ctrl_byte = prueth->fw_offsets->mc_ctrl_byte;
>> + mc_filter_ctrl = ram + mc_ctrl_byte;
>
> mc_filter_ctrl = ram + ICSS_EMAC_FW_MULTICAST_FILTER_CTRL_OFFSET; ???
>
Sure we will evaluate this and address in the next version.
>> +static void icssm_prueth_sw_fdb_work(struct work_struct *work)
>> +{
>> + struct icssm_prueth_sw_fdb_work *fdb_work =
>> + container_of(work, struct icssm_prueth_sw_fdb_work, work);
>> + struct prueth_emac *emac = fdb_work->emac;
>> +
>> + rtnl_lock();
>> +
>> + /* Interface is not up */
>> + if (!emac->prueth->fdb_tbl) {
>> + rtnl_unlock();
>> + goto free;
>> + }
>
> I would probably put the rtnl_unlock() after free: label.
>
We will address this in the next version.
Thanks and Regards,
Parvathi.
Powered by blists - more mailing lists