Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2250349pxk; Sun, 27 Sep 2020 00:17:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkNQSGayppClOl/tRk6AGLWfjvqh8CnTuzSkN1UUuudsCmZSkgrAtKVfJe4riyUqzJsnYZ X-Received: by 2002:a17:906:715b:: with SMTP id z27mr10861197ejj.166.1601191051290; Sun, 27 Sep 2020 00:17:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601191051; cv=none; d=google.com; s=arc-20160816; b=QFJeKW6Rk1b+IKovMXRWnPyZuQwqcU37wdnQLQM3Bxonu4mfxSqxtxt9Yl+xVkcRTd PoWDJDHpiJMMwTuaWnJZZt8tJJcHPDaP1vfdoRGRnnO9A1YYKMxGw6mkEcNrUBseg4Uc Wtj6/CNhvoiyC9PtVkBcBqRmUtGDDK3/unwd0BOfxf5iYitYN9Ry1ia6wwT9B0fcsl4s pWEPB8ElegS0D+QwNIw8T52XtSlbxeymegUY/ICGiTj8JDSkgQkBE/+ezQBdcHkOfemN l1/k0N2aU2tlU3EVVy4u8QveFN2fdyOqN3W4fhuF9sRqATdcamRw6IyJalGyrIRrQ1Ua c4rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=mHBAd4nYy/bWeuv3sr/7FjdATmwRrPWmrM1Pa33HdDc=; b=yCc1+lYEORSk4HfJ82GnzqQqFG5f3FGiTMYGfsfYSk4IAs6Xni7dChXzjiAx2IbyI5 k+H53JmBUrptFyp8kqqOC1aBQic13kIbDsSHRA17hlbGjB5oa3Km4yE0fiCFN3v66cdD hU36VnL9NvcvA9Yqh2gj0AV+9otY/eOIZKUR2p93CFoAe89DeqXoCVPnNO4XOgF4jxAo uH7Q3+eOPlMUcD0kcfBGoZNCZ9RlXGnF8ekOOd7b788UFrtf/VooQtfjYe9pOwNJqtDf fhcHzfk0Ieu+/svuvbOBdBB+HmJaJT82RdqkRNnqpYTXBN+GM0roQOKwevsd/XvLejNq ba9w== 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 bu14si5599055edb.128.2020.09.27.00.17.09; Sun, 27 Sep 2020 00:17:31 -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 S1730474AbgI0HPr (ORCPT + 99 others); Sun, 27 Sep 2020 03:15:47 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:14247 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730423AbgI0HPp (ORCPT ); Sun, 27 Sep 2020 03:15:45 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 774C4237626CB6EA11D4; Sun, 27 Sep 2020 15:15:41 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.487.0; Sun, 27 Sep 2020 15:15:32 +0800 From: Huazhong Tan To: CC: , , , , , , Guangbin Huang , Huazhong Tan Subject: [PATCH net-next 02/10] net: hns3: delete redundant PCI revision judgement Date: Sun, 27 Sep 2020 15:12:40 +0800 Message-ID: <1601190768-50075-3-git-send-email-tanhuazhong@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1601190768-50075-1-git-send-email-tanhuazhong@huawei.com> References: <1601190768-50075-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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Guangbin Huang Fibre device of PCI revision 0x20 don't support autoneg, and the ops get_autoneg() return AUTONEG_DISABLE so function hns3_nway_reset() will return earlier than judging PCI revision. Function hclge_handle_rocee_ras_error() don't need to judge PCI revision again because its caller hclge_handle_hw_ras_error() has judged once. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 3 --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c index df28811..96b4d97 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c @@ -1076,9 +1076,6 @@ static int hns3_nway_reset(struct net_device *netdev) if (phy) return genphy_restart_aneg(phy); - if (handle->pdev->revision == 0x20) - return -EOPNOTSUPP; - return ops->restart_autoneg(handle); } diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c index 5d80efd..9ee55ee 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c @@ -1577,8 +1577,7 @@ static void hclge_handle_rocee_ras_error(struct hnae3_ae_dev *ae_dev) struct hclge_dev *hdev = ae_dev->priv; enum hnae3_reset_type reset_type; - if (test_bit(HCLGE_STATE_RST_HANDLING, &hdev->state) || - hdev->pdev->revision < 0x21) + if (test_bit(HCLGE_STATE_RST_HANDLING, &hdev->state)) return; reset_type = hclge_log_and_clear_rocee_ras_error(hdev); -- 2.7.4