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)
commitde11b84f9ac69fea8f35949601443092e576cfe6
tree172c251be52640ca808e70e78cb839545085187e
parent66e2d246607766832464f0a7b682e11d89c58dee
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