net: hns3: add phy loopback support for imp-controlled PHYs
authorGuangbin Huang <huangguangbin2@huawei.com>
Fri, 12 Mar 2021 08:50:16 +0000 (16:50 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 13 Mar 2021 22:11:29 +0000 (14:11 -0800)
commitb47cfe1f402dbf10279b8f12131388fdff9d2259
tree9ad2805dcd85da55f6c64dd5365215d823cd148f
parent024712f51e5711d69ced729fb3398819ed6e8b53
net: hns3: add phy loopback support for imp-controlled PHYs

If the imp-controlled PHYs feature is enabled, driver can not
call phy driver interface to set loopback anymore and needs
to send command to firmware to start phy loopback.

Driver reuses the existing firmware command 0x0315 to start
phy loopback, just add a setting bit in this command. As this
command is not only for serdes loopback anymore, rename this
command to "xxx_COMMON_LOOPBACK", and modify function name,
macro name and logs related to it.

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_cmd.h
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c