net: amd-xgbe: add missed tasklet_kill
authorJiguang Xiao <jiguang.xiao@windriver.com>
Wed, 28 Dec 2022 08:14:47 +0000 (16:14 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 08:26:40 +0000 (09:26 +0100)
[ Upstream commit d530ece70f16f912e1d1bfeea694246ab78b0a4b ]

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/amd/xgbe/xgbe-drv.c
drivers/net/ethernet/amd/xgbe/xgbe-i2c.c
drivers/net/ethernet/amd/xgbe/xgbe-mdio.c

index 78412d6024aad68b93300326fc4682ba411feffe..ad6f193fac95963c52966e5b9459f0f750ccabc8 100644 (file)
@@ -1142,6 +1142,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);
 
index 4d9062d35930f74bfd7864ff989d0dcf4c054325..530043742a07a6686612c30a6bc42763961c515e 100644 (file)
@@ -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)
index 20ac6db6437b77da39dfc9403a0c27c34f11bfb0..bbb93c2637f397d738594bad0767e411d6257c0e 100644 (file)
@@ -1400,8 +1400,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);