diff options
author | Yufeng Mo <moyufeng@huawei.com> | 2021-08-10 21:28:48 +0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-08-11 15:03:30 -0700 |
commit | ddccc5e368a33daeb6862192d4dca8e59af9234a (patch) | |
tree | 2ef9b7dffb4d29919d336746f1d92189103248f5 /drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | |
parent | Merge branch 'bonding-cleanup-header-file-and-error-msgs' (diff) | |
download | linux-dev-ddccc5e368a33daeb6862192d4dca8e59af9234a.tar.xz linux-dev-ddccc5e368a33daeb6862192d4dca8e59af9234a.zip |
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>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns3/hns3_enet.h')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h index 27809d68d6ed..b0e696b08b8b 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h @@ -596,6 +596,11 @@ struct hns3_hw_error_info { const char *msg; }; +struct hns3_reset_type_map { + enum ethtool_reset_flags rst_flags; + enum hnae3_reset_type rst_type; +}; + static inline int ring_space(struct hns3_enet_ring *ring) { /* This smp_load_acquire() pairs with smp_store_release() in |