net: hns3: add autoneg and change speed support for fibre port
authorJian Shen <shenjian15@huawei.com>
Fri, 3 May 2019 09:50:38 +0000 (17:50 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 4 May 2019 04:02:41 +0000 (00:02 -0400)
commit22f48e24a23de68360ce9fcdce42d1612240d263
tree172c251be52640ca808e70e78cb839545085187e
parent88d10bd6f73014e8392968cc1db246ad4bf98792
net: hns3: add autoneg and change speed support for fibre port

Previously, our driver only supports phydev to autoneg or change
port speed. This patch adds support for fibre port, driver gets
media speed capability and autoneg capability from firmware. If
the media supports multiple speeds, user can change port speed
with command "ethtool -s <devname> speed xxxx autoneg off duplex
full". If autoneg on, the user configuration may be overwritten
by the autoneg result.

Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hnae3.h
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c