[PATCH net-next v5 3/3] net: ti: icssm-prueth: Adds support for ICSSM RSTP switch
Parvathi Pudi
parvathi at couthit.com
Wed Nov 19 22:25:51 PST 2025
Hi,
> On Thu, Nov 13, 2025 at 03:40:23PM +0530, Parvathi Pudi wrote:
>
> ...
>
>> @@ -1012,17 +1074,77 @@ static int icssm_emac_ndo_stop(struct net_device *ndev)
>> hrtimer_cancel(&emac->tx_hrtimer);
>>
>> /* stop the PRU */
>> - rproc_shutdown(emac->pru);
>> + if (!PRUETH_IS_EMAC(prueth))
>> + icssm_prueth_sw_shutdown_prus(emac, ndev);
>> + else
>> + rproc_shutdown(emac->pru);
>> +
>> + /* free table memory of the switch */
>> + if (PRUETH_IS_SWITCH(emac->prueth))
>> + icssm_prueth_sw_free_fdb_table(prueth);
>
> The conditional block above appears to open-code icssm_prueth_free_memory()
> which is also called below. I don't think this this duplication causes
> any harm, as it looks like the second, indirect, call to
> icssm_prueth_sw_free_fdb_table() will be a noop. But it does seem
> unnecessary.
>
Sure. We will address this and remove the duplicate code.
Thanks and Regards,
Parvathi.
More information about the linux-arm-kernel
mailing list