All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] net: ethernet: mtk-star-emac: disable napi when connect and start PHY failed in mtk_star_enable()
@ 2022-11-07  1:21 ` Zhengchao Shao
  0 siblings, 0 replies; 6+ messages in thread
From: Zhengchao Shao @ 2022-11-07  1:21 UTC (permalink / raw)
  To: netdev, linux-arm-kernel, linux-mediatek, nbd, john, sean.wang,
	Mark-MC.Lee, davem, edumazet, kuba, pabeni, matthias.bgg
  Cc: bgolaszewski, weiyongjun1, yuehaibing, shaozhengchao

When failed to connect to and start PHY in mtk_star_enable() for opening
device, napi isn't disabled. When open mtk star device next time, it will
reports a invalid opcode issue. Fix it. Only be compiled, not be tested.

Fixes: 8c7bd5a454ff ("net: ethernet: mtk-star-emac: new driver")
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
---
 drivers/net/ethernet/mediatek/mtk_star_emac.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/mediatek/mtk_star_emac.c b/drivers/net/ethernet/mediatek/mtk_star_emac.c
index 7e890f81148e..7050351250b7 100644
--- a/drivers/net/ethernet/mediatek/mtk_star_emac.c
+++ b/drivers/net/ethernet/mediatek/mtk_star_emac.c
@@ -1026,6 +1026,8 @@ static int mtk_star_enable(struct net_device *ndev)
 	return 0;
 
 err_free_irq:
+	napi_disable(&priv->rx_napi);
+	napi_disable(&priv->tx_napi);
 	free_irq(ndev->irq, ndev);
 err_free_skbs:
 	mtk_star_free_rx_skbs(priv);
-- 
2.17.1


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

* [PATCH net] net: ethernet: mtk-star-emac: disable napi when connect and start PHY failed in mtk_star_enable()
@ 2022-11-07  1:21 ` Zhengchao Shao
  0 siblings, 0 replies; 6+ messages in thread
From: Zhengchao Shao @ 2022-11-07  1:21 UTC (permalink / raw)
  To: netdev, linux-arm-kernel, linux-mediatek, nbd, john, sean.wang,
	Mark-MC.Lee, davem, edumazet, kuba, pabeni, matthias.bgg
  Cc: bgolaszewski, weiyongjun1, yuehaibing, shaozhengchao

When failed to connect to and start PHY in mtk_star_enable() for opening
device, napi isn't disabled. When open mtk star device next time, it will
reports a invalid opcode issue. Fix it. Only be compiled, not be tested.

Fixes: 8c7bd5a454ff ("net: ethernet: mtk-star-emac: new driver")
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
---
 drivers/net/ethernet/mediatek/mtk_star_emac.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/mediatek/mtk_star_emac.c b/drivers/net/ethernet/mediatek/mtk_star_emac.c
index 7e890f81148e..7050351250b7 100644
--- a/drivers/net/ethernet/mediatek/mtk_star_emac.c
+++ b/drivers/net/ethernet/mediatek/mtk_star_emac.c
@@ -1026,6 +1026,8 @@ static int mtk_star_enable(struct net_device *ndev)
 	return 0;
 
 err_free_irq:
+	napi_disable(&priv->rx_napi);
+	napi_disable(&priv->tx_napi);
 	free_irq(ndev->irq, ndev);
 err_free_skbs:
 	mtk_star_free_rx_skbs(priv);
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH net] net: ethernet: mtk-star-emac: disable napi when connect and start PHY failed in mtk_star_enable()
  2022-11-07  1:21 ` Zhengchao Shao
@ 2022-11-07  7:54   ` Leon Romanovsky
  -1 siblings, 0 replies; 6+ messages in thread
From: Leon Romanovsky @ 2022-11-07  7:54 UTC (permalink / raw)
  To: Zhengchao Shao
  Cc: netdev, linux-arm-kernel, linux-mediatek, nbd, john, sean.wang,
	Mark-MC.Lee, davem, edumazet, kuba, pabeni, matthias.bgg,
	bgolaszewski, weiyongjun1, yuehaibing

On Mon, Nov 07, 2022 at 09:21:59AM +0800, Zhengchao Shao wrote:
> When failed to connect to and start PHY in mtk_star_enable() for opening
> device, napi isn't disabled. When open mtk star device next time, it will
> reports a invalid opcode issue. Fix it. Only be compiled, not be tested.
> 
> Fixes: 8c7bd5a454ff ("net: ethernet: mtk-star-emac: new driver")
> Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
> ---
>  drivers/net/ethernet/mediatek/mtk_star_emac.c | 2 ++
>  1 file changed, 2 insertions(+)
> 

Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>

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

* Re: [PATCH net] net: ethernet: mtk-star-emac: disable napi when connect and start PHY failed in mtk_star_enable()
@ 2022-11-07  7:54   ` Leon Romanovsky
  0 siblings, 0 replies; 6+ messages in thread
From: Leon Romanovsky @ 2022-11-07  7:54 UTC (permalink / raw)
  To: Zhengchao Shao
  Cc: netdev, linux-arm-kernel, linux-mediatek, nbd, john, sean.wang,
	Mark-MC.Lee, davem, edumazet, kuba, pabeni, matthias.bgg,
	bgolaszewski, weiyongjun1, yuehaibing

On Mon, Nov 07, 2022 at 09:21:59AM +0800, Zhengchao Shao wrote:
> When failed to connect to and start PHY in mtk_star_enable() for opening
> device, napi isn't disabled. When open mtk star device next time, it will
> reports a invalid opcode issue. Fix it. Only be compiled, not be tested.
> 
> Fixes: 8c7bd5a454ff ("net: ethernet: mtk-star-emac: new driver")
> Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
> ---
>  drivers/net/ethernet/mediatek/mtk_star_emac.c | 2 ++
>  1 file changed, 2 insertions(+)
> 

Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH net] net: ethernet: mtk-star-emac: disable napi when connect and start PHY failed in mtk_star_enable()
  2022-11-07  1:21 ` Zhengchao Shao
@ 2022-11-08 12:40   ` patchwork-bot+netdevbpf
  -1 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-11-08 12:40 UTC (permalink / raw)
  To: Zhengchao Shao
  Cc: netdev, linux-arm-kernel, linux-mediatek, nbd, john, sean.wang,
	Mark-MC.Lee, davem, edumazet, kuba, pabeni, matthias.bgg,
	bgolaszewski, weiyongjun1, yuehaibing

Hello:

This patch was applied to netdev/net.git (master)
by Paolo Abeni <pabeni@redhat.com>:

On Mon, 7 Nov 2022 09:21:59 +0800 you wrote:
> When failed to connect to and start PHY in mtk_star_enable() for opening
> device, napi isn't disabled. When open mtk star device next time, it will
> reports a invalid opcode issue. Fix it. Only be compiled, not be tested.
> 
> Fixes: 8c7bd5a454ff ("net: ethernet: mtk-star-emac: new driver")
> Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
> 
> [...]

Here is the summary with links:
  - [net] net: ethernet: mtk-star-emac: disable napi when connect and start PHY failed in mtk_star_enable()
    https://git.kernel.org/netdev/net/c/b0c09c7f08c2

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] 6+ messages in thread

* Re: [PATCH net] net: ethernet: mtk-star-emac: disable napi when connect and start PHY failed in mtk_star_enable()
@ 2022-11-08 12:40   ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-11-08 12:40 UTC (permalink / raw)
  To: Zhengchao Shao
  Cc: netdev, linux-arm-kernel, linux-mediatek, nbd, john, sean.wang,
	Mark-MC.Lee, davem, edumazet, kuba, pabeni, matthias.bgg,
	bgolaszewski, weiyongjun1, yuehaibing

Hello:

This patch was applied to netdev/net.git (master)
by Paolo Abeni <pabeni@redhat.com>:

On Mon, 7 Nov 2022 09:21:59 +0800 you wrote:
> When failed to connect to and start PHY in mtk_star_enable() for opening
> device, napi isn't disabled. When open mtk star device next time, it will
> reports a invalid opcode issue. Fix it. Only be compiled, not be tested.
> 
> Fixes: 8c7bd5a454ff ("net: ethernet: mtk-star-emac: new driver")
> Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
> 
> [...]

Here is the summary with links:
  - [net] net: ethernet: mtk-star-emac: disable napi when connect and start PHY failed in mtk_star_enable()
    https://git.kernel.org/netdev/net/c/b0c09c7f08c2

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



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2022-11-08 12:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-07  1:21 [PATCH net] net: ethernet: mtk-star-emac: disable napi when connect and start PHY failed in mtk_star_enable() Zhengchao Shao
2022-11-07  1:21 ` Zhengchao Shao
2022-11-07  7:54 ` Leon Romanovsky
2022-11-07  7:54   ` Leon Romanovsky
2022-11-08 12:40 ` patchwork-bot+netdevbpf
2022-11-08 12:40   ` 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.