[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1efe8317-ef7c-f636-71bc-02ceb28cf0fd@amd.com>
Date: Tue, 3 Jan 2023 10:51:17 -0600
From: Tom Lendacky <thomas.lendacky@....com>
To: jiguang.xiao@...driver.com, Shyam-sundar.S-k@....com
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, Prashant.Chikhalkar@...driver.com,
zhaolong.zhang@...driver.com, Rick.Ilowite@...driver.com
Subject: Re: [PATCH] net: amd-xgbe: add missed tasklet_kill
On 12/28/22 02:14, jiguang.xiao@...driver.com wrote:
> From: Jiguang Xiao <jiguang.xiao@...driver.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@...driver.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);
>
Powered by blists - more mailing lists