From: Simon Horman <horms@kernel.org>
To: Parvathi Pudi <parvathi@couthit.com>
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, danishanwar@ti.com,
rogerq@kernel.org, pmohan@couthit.com, basharath@couthit.com,
afd@ti.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, alok.a.tiwari@oracle.com,
pratheesh@ti.com, j-rameshbabu@ti.com, vigneshr@ti.com,
praneeth@ti.com, srk@ti.com, rogerq@ti.com, krishna@couthit.com,
mohan@couthit.com
Subject: Re: [PATCH net-next v5 3/3] net: ti: icssm-prueth: Adds support for ICSSM RSTP switch
Date: Mon, 17 Nov 2025 21:09:14 +0000 [thread overview]
Message-ID: <aRuO-ib0us1JCrxc@horms.kernel.org> (raw)
In-Reply-To: <20251113101229.675141-4-parvathi@couthit.com>
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;
> }
...
next prev parent reply other threads:[~2025-11-17 21:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-13 10:10 [PATCH net-next v5 0/3] STP/RSTP SWITCH support for PRU-ICSSM Ethernet driver Parvathi Pudi
2025-11-13 10:10 ` [PATCH net-next v5 1/3] net: ti: icssm-prueth: Adds helper functions to configure and maintain FDB Parvathi Pudi
2025-11-17 21:07 ` Simon Horman
2025-11-20 6:20 ` Parvathi Pudi
2025-11-13 10:10 ` [PATCH net-next v5 2/3] net: ti: icssm-prueth: Adds switchdev support for icssm_prueth driver Parvathi Pudi
2025-11-17 21:08 ` Simon Horman
2025-11-20 6:22 ` Parvathi Pudi
2025-11-13 10:10 ` [PATCH net-next v5 3/3] net: ti: icssm-prueth: Adds support for ICSSM RSTP switch Parvathi Pudi
2025-11-17 21:09 ` Simon Horman [this message]
2025-11-20 6:25 ` Parvathi Pudi
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=aRuO-ib0us1JCrxc@horms.kernel.org \
--to=horms@kernel.org \
--cc=afd@ti.com \
--cc=alok.a.tiwari@oracle.com \
--cc=andrew+netdev@lunn.ch \
--cc=basharath@couthit.com \
--cc=danishanwar@ti.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=j-rameshbabu@ti.com \
--cc=krishna@couthit.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mohan@couthit.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=parvathi@couthit.com \
--cc=pmohan@couthit.com \
--cc=praneeth@ti.com \
--cc=pratheesh@ti.com \
--cc=rogerq@kernel.org \
--cc=rogerq@ti.com \
--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).