diff options
author | Huazhong Tan <tanhuazhong@huawei.com> | 2019-04-25 15:42:51 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-04-26 19:13:28 +0300 |
commit | 146e92c13fdedf43a1ae211e85acde4631bb3c71 (patch) | |
tree | d26e97cb9223de5231df1106ce81b048884b56db /drivers/net/ethernet/hisilicon/hns3/hns3vf | |
parent | b7048d324b5ebcb99022e2e7296f03918e5f38c4 (diff) | |
download | linux-146e92c13fdedf43a1ae211e85acde4631bb3c71.tar.xz |
net: hns3: not reset TQP in the DOWN while VF resetting
Since the hardware does not handle mailboxes and the hardware
reset include TQP reset, so it is unnecessary to reset TQP
in the hclgevf_ae_stop() while doing VF reset. Also it is
unnecessary to reset the remaining TQP when one reset fails.
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns3/hns3vf')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c index 7672cab54643..6ce5b036fbf4 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c @@ -2050,8 +2050,10 @@ static void hclgevf_ae_stop(struct hnae3_handle *handle) set_bit(HCLGEVF_STATE_DOWN, &hdev->state); - for (i = 0; i < handle->kinfo.num_tqps; i++) - hclgevf_reset_tqp(handle, i); + if (hdev->reset_type != HNAE3_VF_RESET) + for (i = 0; i < handle->kinfo.num_tqps; i++) + if (hclgevf_reset_tqp(handle, i)) + break; /* reset tqp stats */ hclgevf_reset_tqp_stats(handle); |