From 9b56d9a5a7ad7d02d1b1a1601cad730dfee6bce1 Mon Sep 17 00:00:00 2001 From: Guangbin Huang Date: Sun, 27 Sep 2020 15:12:40 +0800 Subject: net: hns3: delete redundant PCI revision judgement 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 Signed-off-by: David S. Miller --- drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c') diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c index df28811de63b..96b4d9710043 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); } -- cgit v1.2.3-59-g8ed1b