diff options
author | Guangbin Huang <huangguangbin2@huawei.com> | 2020-02-19 04:23:30 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-02-20 03:25:12 +0300 |
commit | 2d3db26d78805c9e06e26def0081c76e9bb0b7d6 (patch) | |
tree | 6114455f0a48d322dda613c694d7ec5d38054340 /drivers | |
parent | e99f8e7f88b5239812acdaa84560e6015eb8c2d2 (diff) | |
download | linux-2d3db26d78805c9e06e26def0081c76e9bb0b7d6.tar.xz |
net: hns3: modify an unsuitable print when setting unknown duplex to fibre
Currently, if device is in link down status and user uses
'ethtool -s' command to set speed but not specify duplex
mode, the duplex mode passed from ethtool to driver is
unknown value(255), and the fibre port will identify this
value as half duplex mode and print "only copper port
supports half duplex!". This message is confusing.
So for fibre port, only the setting duplex is half, prints
error and returns.
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')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c index c03856e63320..3f59a1924390 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c @@ -736,7 +736,7 @@ static int hns3_check_ksettings_param(const struct net_device *netdev, if (ops->get_media_type) ops->get_media_type(handle, &media_type, &module_type); - if (cmd->base.duplex != DUPLEX_FULL && + if (cmd->base.duplex == DUPLEX_HALF && media_type != HNAE3_MEDIA_TYPE_COPPER) { netdev_err(netdev, "only copper port supports half duplex!"); |