diff options
author | Jian Shen <shenjian15@huawei.com> | 2018-12-20 06:51:58 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-12-20 10:47:58 +0300 |
commit | 8cdb992f0dc36d6382840b1a6320e0c327a7d644 (patch) | |
tree | 2462a45651f930fb4415d7941ff7d2d2f03d7f2f /drivers/net/ethernet/hisilicon/hns3/hnae3.h | |
parent | 754d5da63145852736f34cfc762164f5d8d6537b (diff) | |
download | linux-8cdb992f0dc36d6382840b1a6320e0c327a7d644.tar.xz |
net: hns3: refine the handle for hns3_nic_net_open/stop()
When triggering nic down, there is a time window between bringing down
the protocol stack and stopping the work task. If the net is up in the
time window, it may bring up the protocol stack again.
This patch fixes it by stop the work task at the beginning of
hns3_nic_net_stop(). To keep symmetrical, start the work task at the
end of hns3_nic_net_open().
Signed-off-by: Jian Shen <shenjian15@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/hnae3.h')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns3/hnae3.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hnae3.h b/drivers/net/ethernet/hisilicon/hns3/hnae3.h index 845d43d3a920..36eab37d8a40 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hnae3.h +++ b/drivers/net/ethernet/hisilicon/hns3/hnae3.h @@ -461,6 +461,7 @@ struct hnae3_ae_ops { unsigned long (*ae_dev_reset_cnt)(struct hnae3_handle *handle); int (*set_gro_en)(struct hnae3_handle *handle, int enable); u16 (*get_global_queue_id)(struct hnae3_handle *handle, u16 queue_id); + void (*set_timer_task)(struct hnae3_handle *handle, bool enable); }; struct hnae3_dcb_ops { |