diff options
author | Guangbin Huang <huangguangbin2@huawei.com> | 2020-09-27 15:12:40 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-09-27 13:25:22 -0700 |
commit | 9b56d9a5a7ad7d02d1b1a1601cad730dfee6bce1 (patch) | |
tree | 0c7e277ef438fc4fefa53bf0888ac8aeb6dcd14b /drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | |
parent | net: hns3: add device version to replace pci revision (diff) | |
download | linux-dev-9b56d9a5a7ad7d02d1b1a1601cad730dfee6bce1.tar.xz linux-dev-9b56d9a5a7ad7d02d1b1a1601cad730dfee6bce1.zip |
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 <huangguangbin2@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 3 |
1 files changed, 0 insertions, 3 deletions
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); } |