Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp4245773rwl; Wed, 28 Dec 2022 01:11:26 -0800 (PST) X-Google-Smtp-Source: AMrXdXvYv3DNUIoVWGGnw1S4KV5y9/I6gPMWc96F8gbBZ+3QJIUsnwTkeTaFR68Kx2bBu7bvfX7y X-Received: by 2002:a17:906:394d:b0:7c1:8450:f963 with SMTP id g13-20020a170906394d00b007c18450f963mr19175562eje.34.1672218685774; Wed, 28 Dec 2022 01:11:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672218685; cv=none; d=google.com; s=arc-20160816; b=VLoQjafan1TqY9LLOU5BIJ276f2gX5M3/LtI5X20ggxS9z0F03mt7pLdagqVmGXAj8 F3QN/VPrFk6ycy/I4m/vupIRCo05wTZ9lrkgoAhPI6g+lUxJCnZkeASLXYQx+16X8fWJ MD6nYQOYhxSTBzgyeSCo3ereksdhZQU5nSyeR+h1kwTTqxVkhfNksZsMCwG83xCKJDIw wDSVei//SN+/Futwc/f9YXMkoklDR+6bTaNVPCl1IZoKFyhbrZKi+cAk9uwLTsWtYBJL AYXkWFTrGh1/8GUFbXSYJ4Yq3G2JyykyIzHFp1sBKfzg4UJtwuNvcms+mB4ed7jL8dZo lZMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=xBuBCi9NgPc/kwR2mHvyu8PQ8QXFaFzc+u3xDocTu0I=; b=nL4BL6E3oq1GNOB0Xfm+ckUJ6LuZFdRsaN9wYf6sUIg2A3Q9Yr8sdMBSXjc2mgsCPc b+wigDT7Gs7hHdE1i+A0Nabrg6m/UFjWZ3ad9laezCprYCWgeKSeXgMH6P5o9fsDLdLA 9LPRdTR3OJVBD71QB+Ou9eCYnBaxKGQv2rltkUaOG5IuCC2VSCenWWgZIm7A5h52+55i A68ZPIvpYbo18/ThsGLYPJAUCvD7bEKb4h+n1EXq2jH0N48U4KVquMNWitmG/+Y5QuqZ +WHE4c2k9qvNZYjE0JTJS+MMjGjRTLRKR45FaA9MzXaeQZR/X6+8dLtT2quvP87MqHci O9AQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=windriver.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i16-20020a1709064fd000b0073d8ccd37c2si13799002ejw.107.2022.12.28.01.11.11; Wed, 28 Dec 2022 01:11:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=windriver.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232629AbiL1Ise (ORCPT + 64 others); Wed, 28 Dec 2022 03:48:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232791AbiL1IsJ (ORCPT ); Wed, 28 Dec 2022 03:48:09 -0500 X-Greylist: delayed 1808 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 28 Dec 2022 00:45:22 PST Received: from mail1.wrs.com (mail1.windriver.com [147.11.146.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC9DB396; Wed, 28 Dec 2022 00:45:22 -0800 (PST) Received: from mail.windriver.com (mail.wrs.com [147.11.1.11]) by mail1.wrs.com (8.15.2/8.15.2) with ESMTPS id 2BS8Ep4n001781 (version=TLSv1.1 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 28 Dec 2022 00:14:51 -0800 Received: from pek-lpd-ccm4.wrs.com (pek-lpd-ccm4.wrs.com [128.224.153.194]) by mail.windriver.com (8.15.2/8.15.2) with ESMTP id 2BS8ElXl025145; Wed, 28 Dec 2022 00:14:48 -0800 (PST) From: jiguang.xiao@windriver.com To: thomas.lendacky@amd.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, Jiguang.Xiao@windriver.com Subject: [PATCH] net: amd-xgbe: add missed tasklet_kill Date: Wed, 28 Dec 2022 16:14:47 +0800 Message-Id: <20221228081447.3400369-1-jiguang.xiao@windriver.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jiguang Xiao 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 --- 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