mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tom Lendacky <thomas.lendacky@amd.com>
To: jiguang.xiao@windriver.com, Shyam-sundar.S-k@amd.com
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, Prashant.Chikhalkar@windriver.com,
	zhaolong.zhang@windriver.com, Rick.Ilowite@windriver.com
Subject: Re: [PATCH] net: amd-xgbe: add missed tasklet_kill
Date: Tue, 3 Jan 2023 10:51:17 -0600	[thread overview]
Message-ID: <1efe8317-ef7c-f636-71bc-02ceb28cf0fd@amd.com> (raw)
In-Reply-To: <20221228081447.3400369-1-jiguang.xiao@windriver.com>

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

      parent reply	other threads:[~2023-01-03 16:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-28  8:14 jiguang.xiao
2022-12-30  7:40 ` patchwork-bot+netdevbpf
2023-01-03 16:51 ` Tom Lendacky [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1efe8317-ef7c-f636-71bc-02ceb28cf0fd@amd.com \
    --to=thomas.lendacky@amd.com \
    --cc=Prashant.Chikhalkar@windriver.com \
    --cc=Rick.Ilowite@windriver.com \
    --cc=Shyam-sundar.S-k@amd.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jiguang.xiao@windriver.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=zhaolong.zhang@windriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®