OSDN Git Service

net: hns3: modify an unsuitable print when setting unknown duplex to fibre
authorGuangbin Huang <huangguangbin2@huawei.com>
Wed, 19 Feb 2020 01:23:30 +0000 (09:23 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Feb 2020 00:25:12 +0000 (16:25 -0800)
commit2d3db26d78805c9e06e26def0081c76e9bb0b7d6
tree6114455f0a48d322dda613c694d7ec5d38054340
parente99f8e7f88b5239812acdaa84560e6015eb8c2d2
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>
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c