[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aRuO-ib0us1JCrxc@horms.kernel.org>
Date: Mon, 17 Nov 2025 21:09:14 +0000
From: Simon Horman <horms@...nel.org>
To: Parvathi Pudi <parvathi@...thit.com>
Cc: andrew+netdev@...n.ch, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, danishanwar@...com,
rogerq@...nel.org, pmohan@...thit.com, basharath@...thit.com,
afd@...com, linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, alok.a.tiwari@...cle.com,
pratheesh@...com, j-rameshbabu@...com, vigneshr@...com,
praneeth@...com, srk@...com, rogerq@...com, krishna@...thit.com,
mohan@...thit.com
Subject: Re: [PATCH net-next v5 3/3] net: ti: icssm-prueth: Adds support for
ICSSM RSTP switch
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.
>
> /* free rx interrupts */
> free_irq(emac->rx_irq, ndev);
>
> + /* free memory related to sw */
> + icssm_prueth_free_memory(emac->prueth);
> +
> + if (!prueth->emac_configured)
> + icss_iep_exit(prueth->iep);
> +
> if (netif_msg_drv(emac))
> dev_notice(&ndev->dev, "stopped\n");
>
> return 0;
> }
...
Powered by blists - more mailing lists