]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: add support for triggering reset by ethtool
authorYufeng Mo <moyufeng@huawei.com>
Tue, 10 Aug 2021 13:28:48 +0000 (21:28 +0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 11 Aug 2021 22:03:30 +0000 (15:03 -0700)
commitab785604394daf84e12a7d6fde13790aae7f1bdf
tree2ef9b7dffb4d29919d336746f1d92189103248f5
parent37f91a90c7830b96a2b7ff11597122ff4d36dedd
net: hns3: add support for triggering reset by ethtool

Currently, four reset types are supported for the HNS3 ethernet
driver: IMP reset, global reset, function reset, and FLR. Only
FLR can now be triggered by the user. To restore the device when
an exception occurs, add support for triggering reset by ethtool.

Run the "ethtool --reset DEVNAME mgmt | all | dedicated" to
trigger the IMP | global | function reset manually.

In addition, VF can only trigger function reset.

Signed-off-by: Yufeng Mo <moyufeng@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Link: https://lore.kernel.org/r/1628602128-15640-1-git-send-email-huangguangbin2@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.h
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h