From patchwork Fri Feb 12 18:00:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shyam Sundar S K X-Patchwork-Id: 12085849 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91511C433E0 for ; Fri, 12 Feb 2021 18:02:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4A64E64DBA for ; Fri, 12 Feb 2021 18:02:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231611AbhBLSCQ (ORCPT ); Fri, 12 Feb 2021 13:02:16 -0500 Received: from mail-co1nam11on2056.outbound.protection.outlook.com ([40.107.220.56]:30048 "EHLO NAM11-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231426AbhBLSB5 (ORCPT ); Fri, 12 Feb 2021 13:01:57 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Gh2WM+oBzZs8UX5y1yTUCOy67JvjHkGwxyXCn75I18LWSEQrPz+NDMix6Ow51BQNTDUNJvOvCOIAVfWjHx6v2F3L5sT2607I6k2Ts1FavGfWLSaZB1/ZLL88Up38zAbZIn5rPpdw1MhIJNEIO9qYYmHUPMpCXxuUAS4RpYgnPOlO+BBTjYcqudCyDumakS2bnoFdT0O1qYUoc+8B5VZOP0ja9t43JE35BIAGhmvQSkaQ3AA6fe1WTW8eMyEZcPXDI7MJPn2zMO6NN4LLt9MgHkJJztwFTJlYQIOMrlwT+nu4fl1fHG6E2MtdJvcw68isajRXVvKDOYuhtvQ34kcRGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=L46BZZxPmuYL0WFZfhKTvLKYZ4PAM1AK28xpONHR+3M=; b=oZydRQ41e/DnjDRi4Ia4QT/n6CPNyIuPKYDMV7gqAsC8GY5FDHHl1oeVqZlTPJIkVYY/NpLwoPMYzW7qgdqMOygWXX2L+Q4RtO6ipQeOqD/7ikBSzH00BGK1NtfCZTaPKw0h2lrXeaLp8XfUzOU+OefsosYJ5xZNhcpmwvxXaxEABS0C5os8XFOZEjogyIw03xYffPkJ3er/5nAgS4cHTxz1MJNCfmGDdAk3C6925Lmo3BEOXpqZV/HQ6OwDh/3WWQat0TNBoz2qUqvO1AjN3f2GJGYQ22m7HSqtx5f+FJgf+YzO+8jbCIFp1l2Mpy5cEQxVvk4PlBZYwlyKlnQcKg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=L46BZZxPmuYL0WFZfhKTvLKYZ4PAM1AK28xpONHR+3M=; b=lZRmkEkHe6Ud7MxGcdpdi3kwO69G/blsR2heuckQQiOn7ILoQ2Kg9Z5PXp0UlFQXBuw8zEDFsierZ0rTn/quRJHzhARmq3c7snTANzpVn5INyKpDjepfrvELbqfvmXFVzr4V9EfkYwlptelFLtyYoUapD9t85cra4Zh8/Lgrk3o= Authentication-Results: amd.com; dkim=none (message not signed) header.d=none;amd.com; dmarc=none action=none header.from=amd.com; Received: from SN1PR12MB2495.namprd12.prod.outlook.com (2603:10b6:802:32::17) by SN1PR12MB2399.namprd12.prod.outlook.com (2603:10b6:802:2b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.29; Fri, 12 Feb 2021 18:00:52 +0000 Received: from SN1PR12MB2495.namprd12.prod.outlook.com ([fe80::319c:4e6a:99f1:e451]) by SN1PR12MB2495.namprd12.prod.outlook.com ([fe80::319c:4e6a:99f1:e451%3]) with mapi id 15.20.3846.027; Fri, 12 Feb 2021 18:00:51 +0000 From: Shyam Sundar S K To: Tom Lendacky , "David S . Miller" , Jakub Kicinski , netdev@vger.kernel.org Cc: Sudheesh.Mavila@amd.com, Shyam Sundar S K , Sudheesh Mavila Subject: [PATCH 2/4] amd-xgbe: Fix NETDEV WATCHDOG transmit queue timeout warning Date: Fri, 12 Feb 2021 23:30:08 +0530 Message-Id: <20210212180010.221129-3-Shyam-sundar.S-k@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210212180010.221129-1-Shyam-sundar.S-k@amd.com> References: <20210212180010.221129-1-Shyam-sundar.S-k@amd.com> X-Originating-IP: [165.204.156.251] X-ClientProxiedBy: MAXPR01CA0089.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:49::31) To SN1PR12MB2495.namprd12.prod.outlook.com (2603:10b6:802:32::17) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from jatayu.amd.com (165.204.156.251) by MAXPR01CA0089.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:49::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.27 via Frontend Transport; Fri, 12 Feb 2021 18:00:49 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 89f88554-7dfa-477f-73f3-08d8cf8022ab X-MS-TrafficTypeDiagnostic: SN1PR12MB2399: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MPhfdlC845Kp+qwC7lxPP7TFR1aOdRHupBAsq0u4eO6pSs410FcSQWc5IPSvY66wWTds9IqVNy18I2t3GlN2oEKjgjzTxEr8vReBSXvhSOHxT+aviBxyD1qbUO/IC8s0wl5LCv9tMLE0qllTG7iJfYJLa/Po5GNhubF5rkp0QtzPo+FwJ87C7CHXrhSw6QIeUtY5tJys5VASZwZwMJw6Mmk/zuGIqKdv1ARMpTXf7KBzHMnIWJ4+DMvrbM1ZC139QKNGw+DtCXq0bkRKB+CtkOHWvJp+nmXQEZ1bqw/NWiIm9oWFYHdIGjHuhbM86IOPqi+O5BOLmfQgIC+CF01EWE+XF7SJpaL78+wln7G8EBlsFsdtZSwbht3K0wnJs0SMykF/FFNL4YV4vQDBbw+AxUkCVpLmiSyY75JgLr1UsReAHABoAQvQqko/y57rvlmA+uTsmsTiMqIGlrtgeHHGD+uXT2LGiWv9RNF131PmFFVt/c73kI+NxKGP+RmtZXV5GlfESV7iwaxP5l1WWHHuFA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN1PR12MB2495.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(396003)(366004)(136003)(39860400002)(346002)(376002)(66476007)(66556008)(66946007)(956004)(2906002)(45080400002)(6486002)(36756003)(54906003)(52116002)(4326008)(2616005)(186003)(316002)(16526019)(110136005)(6666004)(26005)(86362001)(83380400001)(7696005)(5660300002)(1076003)(8936002)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cREWiO0j7o/WIlCj6ilwOqti1EpQHWB/CIMpyCAmnhAmo7Ip5Mdce5wbJyKquIWNCQiJA8EDVm4XVKg+R4Qi/1nusIeIEoEGexuG716Dh2GAG45JJ5lY3X9aVYXdxbGzUDM6S1+svXCuqMP8ocAlBkMHNsH5fPtGE66s1mh6yYzGrldNmqvMKHdladsuT7p6Y86gt/fiqPknb8k+1xiKkFRs07aHH9rwj1fmKXQJORn9CX0oLbidN6IWkHmL+EnGh9mtQWGzprBkEf21YVv6yhk0UDTSiTGAiTvZcMMLltYYsbTmQfqX9vBhEmE8DUAbC2yUHd3uvRmCxveQ== X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 89f88554-7dfa-477f-73f3-08d8cf8022ab X-MS-Exchange-CrossTenant-AuthSource: SN1PR12MB2495.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2021 18:00:51.8849 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: aytCE2JIqEtQ+eslXJrTqls5iycybytERmcp8UEQFjy+faz68SjORbLd/n+ZBZotX/Onk3snhhGW1nN6WY/EqQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB2399 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Current driver calls the netif_carrier_off() during the later point in time to tear down the link which causes the netdev watchdog to timeout. Calling netif_carrier_off() immediately after netif_tx_stop_all_queues() would avoids the warning. ------------[ cut here ]------------ NETDEV WATCHDOG: enp3s0f2 (amd-xgbe): transmit queue 0 timed out WARNING: CPU: 3 PID: 0 at net/sched/sch_generic.c:461 dev_watchdog+0x20d/0x220 Modules linked in: amd_xgbe(E) amd-xgbe 0000:03:00.2 enp3s0f2: Link is Down CPU: 3 PID: 0 Comm: swapper/3 Tainted: G E Hardware name: AMD Bilby-RV2/Bilby-RV2, BIOS RBB1202A 10/18/2019 RIP: 0010:dev_watchdog+0x20d/0x220 Code: 00 49 63 4e e0 eb 92 4c 89 e7 c6 05 c6 e2 c1 00 01 e8 e7 ce fc ff 89 d9 48 RSP: 0018:ffff90cfc28c3e88 EFLAGS: 00010286 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000006 RDX: 0000000000000007 RSI: 0000000000000086 RDI: ffff90cfc28d63c0 RBP: ffff90cfb977845c R08: 0000000000000050 R09: 0000000000196018 R10: ffff90cfc28c3ef8 R11: 0000000000000000 R12: ffff90cfb9778000 R13: 0000000000000003 R14: ffff90cfb9778480 R15: 0000000000000010 FS: 0000000000000000(0000) GS:ffff90cfc28c0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f240ff2d9d0 CR3: 00000001e3e0a000 CR4: 00000000003406e0 Call Trace: ? pfifo_fast_reset+0x100/0x100 call_timer_fn+0x2b/0x130 run_timer_softirq+0x3e8/0x440 ? enqueue_hrtimer+0x39/0x90 Signed-off-by: Sudheesh Mavila Signed-off-by: Shyam Sundar S K Acked-by: Tom Lendacky --- drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 1 + drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c index 2709a2db5657..395eb0b52680 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c @@ -1368,6 +1368,7 @@ static void xgbe_stop(struct xgbe_prv_data *pdata) return; netif_tx_stop_all_queues(netdev); + netif_carrier_off(pdata->netdev); xgbe_stop_timers(pdata); flush_workqueue(pdata->dev_workqueue); diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c index 93ef5a30cb8d..19ee4db0156d 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c @@ -1396,7 +1396,6 @@ static void xgbe_phy_stop(struct xgbe_prv_data *pdata) pdata->phy_if.phy_impl.stop(pdata); pdata->phy.link = 0; - netif_carrier_off(pdata->netdev); xgbe_phy_adjust_link(pdata); }