All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net v1] mlxbf_gige: stop PHY during open() error paths
@ 2024-03-20 19:31 David Thompson
  2024-03-20 22:34 ` Andrew Lunn
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: David Thompson @ 2024-03-20 19:31 UTC (permalink / raw
  To: davem, edumazet, kuba, pabeni, u.kleine-koenig, leon
  Cc: asmaa, netdev, linux-kernel, David Thompson

The mlxbf_gige_open() routine starts the PHY as part of normal
initialization.  The mlxbf_gige_open() routine must stop the
PHY during its error paths.

Fixes: f92e1869d74e ("Add Mellanox BlueField Gigabit Ethernet driver")
Signed-off-by: David Thompson <davthompson@nvidia.com>
Reviewed-by: Asmaa Mnebhi <asmaa@nvidia.com>
---
 drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c
index 3d09fa54598f..cef0e2d3f1a7 100644
--- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c
+++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c
@@ -157,7 +157,7 @@ static int mlxbf_gige_open(struct net_device *netdev)
 
 	err = mlxbf_gige_tx_init(priv);
 	if (err)
-		goto free_irqs;
+		goto phy_deinit;
 	err = mlxbf_gige_rx_init(priv);
 	if (err)
 		goto tx_deinit;
@@ -185,6 +185,9 @@ static int mlxbf_gige_open(struct net_device *netdev)
 tx_deinit:
 	mlxbf_gige_tx_deinit(priv);
 
+phy_deinit:
+	phy_stop(phydev);
+
 free_irqs:
 	mlxbf_gige_free_irqs(priv);
 	return err;
-- 
2.30.1


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

* Re: [PATCH net v1] mlxbf_gige: stop PHY during open() error paths
  2024-03-20 19:31 [PATCH net v1] mlxbf_gige: stop PHY during open() error paths David Thompson
@ 2024-03-20 22:34 ` Andrew Lunn
  2024-03-21  9:48 ` Jiri Pirko
  2024-03-25 11:10 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2024-03-20 22:34 UTC (permalink / raw
  To: David Thompson
  Cc: davem, edumazet, kuba, pabeni, u.kleine-koenig, leon, asmaa,
	netdev, linux-kernel

On Wed, Mar 20, 2024 at 03:31:17PM -0400, David Thompson wrote:
> The mlxbf_gige_open() routine starts the PHY as part of normal
> initialization.  The mlxbf_gige_open() routine must stop the
> PHY during its error paths.
> 
> Fixes: f92e1869d74e ("Add Mellanox BlueField Gigabit Ethernet driver")
> Signed-off-by: David Thompson <davthompson@nvidia.com>
> Reviewed-by: Asmaa Mnebhi <asmaa@nvidia.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

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

* Re: [PATCH net v1] mlxbf_gige: stop PHY during open() error paths
  2024-03-20 19:31 [PATCH net v1] mlxbf_gige: stop PHY during open() error paths David Thompson
  2024-03-20 22:34 ` Andrew Lunn
@ 2024-03-21  9:48 ` Jiri Pirko
  2024-03-25 11:10 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Jiri Pirko @ 2024-03-21  9:48 UTC (permalink / raw
  To: David Thompson
  Cc: davem, edumazet, kuba, pabeni, u.kleine-koenig, leon, asmaa,
	netdev, linux-kernel

Wed, Mar 20, 2024 at 08:31:17PM CET, davthompson@nvidia.com wrote:
>The mlxbf_gige_open() routine starts the PHY as part of normal
>initialization.  The mlxbf_gige_open() routine must stop the
>PHY during its error paths.
>
>Fixes: f92e1869d74e ("Add Mellanox BlueField Gigabit Ethernet driver")
>Signed-off-by: David Thompson <davthompson@nvidia.com>
>Reviewed-by: Asmaa Mnebhi <asmaa@nvidia.com>

Reviewed-by: Jiri Pirko <jiri@nvidia.com>

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

* Re: [PATCH net v1] mlxbf_gige: stop PHY during open() error paths
  2024-03-20 19:31 [PATCH net v1] mlxbf_gige: stop PHY during open() error paths David Thompson
  2024-03-20 22:34 ` Andrew Lunn
  2024-03-21  9:48 ` Jiri Pirko
@ 2024-03-25 11:10 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-03-25 11:10 UTC (permalink / raw
  To: David Thompson
  Cc: davem, edumazet, kuba, pabeni, u.kleine-koenig, leon, asmaa,
	netdev, linux-kernel

Hello:

This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:

On Wed, 20 Mar 2024 15:31:17 -0400 you wrote:
> The mlxbf_gige_open() routine starts the PHY as part of normal
> initialization.  The mlxbf_gige_open() routine must stop the
> PHY during its error paths.
> 
> Fixes: f92e1869d74e ("Add Mellanox BlueField Gigabit Ethernet driver")
> Signed-off-by: David Thompson <davthompson@nvidia.com>
> Reviewed-by: Asmaa Mnebhi <asmaa@nvidia.com>
> 
> [...]

Here is the summary with links:
  - [net,v1] mlxbf_gige: stop PHY during open() error paths
    https://git.kernel.org/netdev/net/c/d6c30c5a168f

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2024-03-25 11:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-20 19:31 [PATCH net v1] mlxbf_gige: stop PHY during open() error paths David Thompson
2024-03-20 22:34 ` Andrew Lunn
2024-03-21  9:48 ` Jiri Pirko
2024-03-25 11:10 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.