Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp170010ybg; Mon, 27 Jul 2020 19:23:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOZkyUrfDypZ6m/0Bb2Av9UupVJEFU1yNZf21kGSL4y/Y62Ow/SsKUVMdLXIarelEDj7M7 X-Received: by 2002:a17:906:743:: with SMTP id z3mr23421258ejb.216.1595903000966; Mon, 27 Jul 2020 19:23:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595903000; cv=none; d=google.com; s=arc-20160816; b=sabkFkGddIz0kFYqSApEfo1Doy3sZYi9Pf0xJ2m9c9lv2VUjGpuTEtMpiWET+G+j/4 xwdaIKPk+O3s53+YJYxB4ntMf3il/tnnnLYOBbFcOXrXIUd3jc4uNAc6sWDMIpvSZ339 T9SjvjgxHzqlCky3uRbaRkD3YJhfYudUKbSA9nCrzm+4sd5VrLzsRHPOa6O2wV3yHkxu evDVSgNpttDG7qtUoGMEP1aDtIko63wuAQXXqw5R06acEFP7+aWBU5ygt44srwnmoNVA 6oYB8xQY2NdkKBVCdABYfJPkktFwxOT/HmuaDCKejuhBPKotdMT3mSZ9VxLhYpw+vUfi QxtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=wSC+Wr7cRDppFAFgtRQh52d5TX4jdtMGXanl9yAcCpg=; b=pj5lZBFeQk39sQKLq6DWh9lmrVE1DXjQwvf4G2oik9W8a/E3Oit6+mkOmf15dkRS3B aUY6VkwS646/ouBFQNY6C5NQFCQqVeuMeA99LsqWWt/CBYN6XPyyAT3I5O+UYkE+2DD7 CXwjse5uTyh9fEPoftluhV+ZKm8Vn5wZUaZAgx/OXkIvxcYtfrXyA49f72I0YdIbPBUX rGM5nlBRRb3ExL6vqJnwmsPSMggpIN1M2BNbPF39rHxnLLN/Z8U0cWfZroILAvt8dnt8 pU0rsg/6MshNhNHE++QTbOrvePbDIxZ4AWMok7uqdq5JcRyvVa3RHpejdWuXN27iax48 hkDQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c18si6332741eds.417.2020.07.27.19.22.57; Mon, 27 Jul 2020 19:23:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726782AbgG1CTJ (ORCPT + 99 others); Mon, 27 Jul 2020 22:19:09 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:8281 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726247AbgG1CTJ (ORCPT ); Mon, 27 Jul 2020 22:19:09 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 7DAC8F6A8F4BC1AD62CD; Tue, 28 Jul 2020 10:19:07 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.487.0; Tue, 28 Jul 2020 10:18:59 +0800 From: Huazhong Tan To: CC: , , , , , , Yonglong Liu , Huazhong Tan Subject: [PATCH net 2/5] net: hns3: fix a TX timeout issue Date: Tue, 28 Jul 2020 10:16:49 +0800 Message-ID: <1595902612-12880-3-git-send-email-tanhuazhong@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1595902612-12880-1-git-send-email-tanhuazhong@huawei.com> References: <1595902612-12880-1-git-send-email-tanhuazhong@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yonglong Liu When the queue depth and queue parameters are modified, there is a low probability that TX timeout occurs. The two operations cause the link to be down or up when the watchdog is still working. All queues are stopped when the link is down. After the carrier is on, all queues are woken up. If the watchdog detects the link between the carrier on and wakeup queues, a false TX timeout occurs. So fix this issue by modifying the sequence of carrier on and queue wakeup, which is symmetrical to the link down action. Fixes: 76ad4f0ee747 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC") Signed-off-by: Yonglong Liu Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index 3328500..71ed4c5 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -4136,8 +4136,8 @@ static void hns3_link_status_change(struct hnae3_handle *handle, bool linkup) return; if (linkup) { - netif_carrier_on(netdev); netif_tx_wake_all_queues(netdev); + netif_carrier_on(netdev); if (netif_msg_link(handle)) netdev_info(netdev, "link up\n"); } else { -- 2.7.4