netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 1/2] net: renesas: rswitch: do not deinit disabled ports
@ 2024-12-06 19:21 Nikita Yushchenko
  2024-12-06 19:21 ` [PATCH net-next 2/2] net: renesas: rswitch: remove speed from gwca structure Nikita Yushchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Nikita Yushchenko @ 2024-12-06 19:21 UTC (permalink / raw)
  To: Yoshihiro Shimoda, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Geert Uytterhoeven
  Cc: netdev, linux-renesas-soc, linux-kernel, Michael Dege,
	Christian Mardmoeller, Dennis Ostermann, Nikita Yushchenko

In rswitch_ether_port_init_all(), only enabled ports are initialized.
Then, rswitch_ether_port_deinit_all() shall also only deinitialize
enabled ports.

Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
---
 drivers/net/ethernet/renesas/rswitch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/renesas/rswitch.c b/drivers/net/ethernet/renesas/rswitch.c
index 3b57abada200..cba80ccc3ce2 100644
--- a/drivers/net/ethernet/renesas/rswitch.c
+++ b/drivers/net/ethernet/renesas/rswitch.c
@@ -1527,7 +1527,7 @@ static void rswitch_ether_port_deinit_all(struct rswitch_private *priv)
 {
 	unsigned int i;
 
-	for (i = 0; i < RSWITCH_NUM_PORTS; i++) {
+	rswitch_for_each_enabled_port(priv, i) {
 		phy_exit(priv->rdev[i]->serdes);
 		rswitch_ether_port_deinit_one(priv->rdev[i]);
 	}
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-12-10  2:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-06 19:21 [PATCH net-next 1/2] net: renesas: rswitch: do not deinit disabled ports Nikita Yushchenko
2024-12-06 19:21 ` [PATCH net-next 2/2] net: renesas: rswitch: remove speed from gwca structure Nikita Yushchenko
2024-12-09  7:24   ` Michal Swiatkowski
2024-12-09  7:25 ` [PATCH net-next 1/2] net: renesas: rswitch: do not deinit disabled ports Michal Swiatkowski
2024-12-10  2:40 ` patchwork-bot+netdevbpf

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).