]> asedeno.scripts.mit.edu Git - linux.git/commit
net: hns3: add set_default_reset_request in the hnae3_ae_ops
authorHuazhong Tan <tanhuazhong@huawei.com>
Wed, 7 Nov 2018 04:06:08 +0000 (12:06 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 7 Nov 2018 19:42:17 +0000 (11:42 -0800)
commit720bd5837e3721f553a896a00da4a99ea12f0551
treee629e38583d9bc7f8e1aee49dea8f347953efb68
parent814da63c557726e60b06a206ec8c1123f176d392
net: hns3: add set_default_reset_request in the hnae3_ae_ops

Currently, when reset_event is called because of tx timeout, it will
upgrade the reset level (For PF, HNAE3_FUNC_RESET -> HNAE3_CORE_RESET
-> HNAE3_GLOBAL_RESET) if the time between the new reset and last reset
is within 20 secs, or restore the reset level to HNAE3_FUNC_RESET if
the time between the new reset and last reset is over 20 secs.

There is requirement that the caller needs to decide the reset level
when triggering a reset, for example, RAS recovery. So this patch
adds the set_default_reset_request to meet this requirement.

Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hnae3.h
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h