]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: add get/set pause parameters support for imp-controlled PHYs
authorGuangbin Huang <huangguangbin2@huawei.com>
Fri, 12 Mar 2021 08:50:14 +0000 (16:50 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 13 Mar 2021 22:11:28 +0000 (14:11 -0800)
commit7fd9fd6e71b0a0e1966ec289014c63f3c6a5a53c
treec962729679ad62059ca69eb85eb927a64e7b2c1c
parent489033547744780bb945836817adfd024b036408
net: hns3: add get/set pause parameters support for imp-controlled PHYs

When the imp-controlled PHYs feature is enabled, phydev is NULL.
In this case, the autoneg is always off when user uses ethtool -a
command to get pause parameters because  hclge_get_pauseparam()
uses phydev to check whether device is TP port. To fit this new
feature, use media type to check whether device is TP port.

And when user set pause parameters, these parameters need to
always set to mac, no matter whether autoneg is off.

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/hns3pf/hclge_main.c