public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: amd-xgbe: add missed tasklet_kill
@ 2022-12-28  8:14 jiguang.xiao
  2022-12-30  7:40 ` patchwork-bot+netdevbpf
  2023-01-03 16:51 ` Tom Lendacky
  0 siblings, 2 replies; 3+ messages in thread
From: jiguang.xiao @ 2022-12-28  8:14 UTC (permalink / raw)
  To: thomas.lendacky, Shyam-sundar.S-k
  Cc: davem, edumazet, kuba, pabeni, netdev, linux-kernel,
	Prashant.Chikhalkar, zhaolong.zhang, Rick.Ilowite, Jiguang.Xiao

From: Jiguang Xiao <jiguang.xiao@windriver.com>

The driver does not call tasklet_kill in several places.
Add the calls to fix it.

Fixes: 85b85c853401 (amd-xgbe: Re-issue interrupt if interrupt status
not cleared)
Signed-off-by: Jiguang Xiao <jiguang.xiao@windriver.com>
---
 drivers/net/ethernet/amd/xgbe/xgbe-drv.c  | 3 +++
 drivers/net/ethernet/amd/xgbe/xgbe-i2c.c  | 4 +++-
 drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 4 +++-
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
index 7b666106feee..614c0278419b 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
@@ -1064,6 +1064,9 @@ static void xgbe_free_irqs(struct xgbe_prv_data *pdata)
 
 	devm_free_irq(pdata->dev, pdata->dev_irq, pdata);
 
+	tasklet_kill(&pdata->tasklet_dev);
+	tasklet_kill(&pdata->tasklet_ecc);
+
 	if (pdata->vdata->ecc_support && (pdata->dev_irq != pdata->ecc_irq))
 		devm_free_irq(pdata->dev, pdata->ecc_irq, pdata);
 
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-i2c.c b/drivers/net/ethernet/amd/xgbe/xgbe-i2c.c
index 22d4fc547a0a..a9ccc4258ee5 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-i2c.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-i2c.c
@@ -447,8 +447,10 @@ static void xgbe_i2c_stop(struct xgbe_prv_data *pdata)
 	xgbe_i2c_disable(pdata);
 	xgbe_i2c_clear_all_interrupts(pdata);
 
-	if (pdata->dev_irq != pdata->i2c_irq)
+	if (pdata->dev_irq != pdata->i2c_irq) {
 		devm_free_irq(pdata->dev, pdata->i2c_irq, pdata);
+		tasklet_kill(&pdata->tasklet_i2c);
+	}
 }
 
 static int xgbe_i2c_start(struct xgbe_prv_data *pdata)
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
index 4e97b4869522..0c5c1b155683 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
@@ -1390,8 +1390,10 @@ static void xgbe_phy_stop(struct xgbe_prv_data *pdata)
 	/* Disable auto-negotiation */
 	xgbe_an_disable_all(pdata);
 
-	if (pdata->dev_irq != pdata->an_irq)
+	if (pdata->dev_irq != pdata->an_irq) {
 		devm_free_irq(pdata->dev, pdata->an_irq, pdata);
+		tasklet_kill(&pdata->tasklet_an);
+	}
 
 	pdata->phy_if.phy_impl.stop(pdata);
 
-- 
2.37.3


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

* Re: [PATCH] net: amd-xgbe: add missed tasklet_kill
  2022-12-28  8:14 [PATCH] net: amd-xgbe: add missed tasklet_kill jiguang.xiao
@ 2022-12-30  7:40 ` patchwork-bot+netdevbpf
  2023-01-03 16:51 ` Tom Lendacky
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-12-30  7:40 UTC (permalink / raw)
  To: None
  Cc: thomas.lendacky, Shyam-sundar.S-k, davem, edumazet, kuba, pabeni,
	netdev, linux-kernel, Prashant.Chikhalkar, zhaolong.zhang,
	Rick.Ilowite, Jiguang.Xiao

Hello:

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

On Wed, 28 Dec 2022 16:14:47 +0800 you wrote:
> From: Jiguang Xiao <jiguang.xiao@windriver.com>
> 
> The driver does not call tasklet_kill in several places.
> Add the calls to fix it.
> 
> Fixes: 85b85c853401 (amd-xgbe: Re-issue interrupt if interrupt status
> not cleared)
> Signed-off-by: Jiguang Xiao <jiguang.xiao@windriver.com>
> 
> [...]

Here is the summary with links:
  - net: amd-xgbe: add missed tasklet_kill
    https://git.kernel.org/netdev/net/c/d530ece70f16

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

* Re: [PATCH] net: amd-xgbe: add missed tasklet_kill
  2022-12-28  8:14 [PATCH] net: amd-xgbe: add missed tasklet_kill jiguang.xiao
  2022-12-30  7:40 ` patchwork-bot+netdevbpf
@ 2023-01-03 16:51 ` Tom Lendacky
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Lendacky @ 2023-01-03 16:51 UTC (permalink / raw)
  To: jiguang.xiao, Shyam-sundar.S-k
  Cc: davem, edumazet, kuba, pabeni, netdev, linux-kernel,
	Prashant.Chikhalkar, zhaolong.zhang, Rick.Ilowite

On 12/28/22 02:14, jiguang.xiao@windriver.com wrote:
> From: Jiguang Xiao <jiguang.xiao@windriver.com>
> 
> The driver does not call tasklet_kill in several places.
> Add the calls to fix it.
> 
> Fixes: 85b85c853401 (amd-xgbe: Re-issue interrupt if interrupt status
> not cleared)
> Signed-off-by: Jiguang Xiao <jiguang.xiao@windriver.com>
> ---
>   drivers/net/ethernet/amd/xgbe/xgbe-drv.c  | 3 +++
>   drivers/net/ethernet/amd/xgbe/xgbe-i2c.c  | 4 +++-
>   drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 4 +++-
>   3 files changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
> index 7b666106feee..614c0278419b 100644
> --- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
> +++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
> @@ -1064,6 +1064,9 @@ static void xgbe_free_irqs(struct xgbe_prv_data *pdata)
>   
>   	devm_free_irq(pdata->dev, pdata->dev_irq, pdata);
>   
> +	tasklet_kill(&pdata->tasklet_dev);
> +	tasklet_kill(&pdata->tasklet_ecc);

Should this tasklet_kill() have been put after the devm_free_irq() for the 
ecc_irq?

Maybe both tasklet_kill() calls could have been moved down a few lines.

Thanks,
Tom

> +
>   	if (pdata->vdata->ecc_support && (pdata->dev_irq != pdata->ecc_irq))
>   		devm_free_irq(pdata->dev, pdata->ecc_irq, pdata);
>   
> diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-i2c.c b/drivers/net/ethernet/amd/xgbe/xgbe-i2c.c
> index 22d4fc547a0a..a9ccc4258ee5 100644
> --- a/drivers/net/ethernet/amd/xgbe/xgbe-i2c.c
> +++ b/drivers/net/ethernet/amd/xgbe/xgbe-i2c.c
> @@ -447,8 +447,10 @@ static void xgbe_i2c_stop(struct xgbe_prv_data *pdata)
>   	xgbe_i2c_disable(pdata);
>   	xgbe_i2c_clear_all_interrupts(pdata);
>   
> -	if (pdata->dev_irq != pdata->i2c_irq)
> +	if (pdata->dev_irq != pdata->i2c_irq) {
>   		devm_free_irq(pdata->dev, pdata->i2c_irq, pdata);
> +		tasklet_kill(&pdata->tasklet_i2c);
> +	}
>   }
>   
>   static int xgbe_i2c_start(struct xgbe_prv_data *pdata)
> diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
> index 4e97b4869522..0c5c1b155683 100644
> --- a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
> +++ b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
> @@ -1390,8 +1390,10 @@ static void xgbe_phy_stop(struct xgbe_prv_data *pdata)
>   	/* Disable auto-negotiation */
>   	xgbe_an_disable_all(pdata);
>   
> -	if (pdata->dev_irq != pdata->an_irq)
> +	if (pdata->dev_irq != pdata->an_irq) {
>   		devm_free_irq(pdata->dev, pdata->an_irq, pdata);
> +		tasklet_kill(&pdata->tasklet_an);
> +	}
>   
>   	pdata->phy_if.phy_impl.stop(pdata);
>   

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

end of thread, other threads:[~2023-01-03 16:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-28  8:14 [PATCH] net: amd-xgbe: add missed tasklet_kill jiguang.xiao
2022-12-30  7:40 ` patchwork-bot+netdevbpf
2023-01-03 16:51 ` Tom Lendacky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox