diff options
author | Huazhong Tan <tanhuazhong@huawei.com> | 2019-12-19 14:57:42 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-12-20 21:20:39 -0800 |
commit | a3374d7d335c24225f7d65bc0abb632d81dacdf6 (patch) | |
tree | c0913e1d1a727838f516f14c4f9a12504fb3a01c /drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.c | |
parent | net: hns3: remove useless mutex vport_cfg_mutex in the struct hclge_dev (diff) | |
download | linux-dev-a3374d7d335c24225f7d65bc0abb632d81dacdf6.tar.xz linux-dev-a3374d7d335c24225f7d65bc0abb632d81dacdf6.zip |
net: hns3: optimization for CMDQ uninitialization
When uninitializing CMDQ, HCLGE_STATE_CMD_DISABLE will
be set up firstly, then the driver does not send command
anymore. So, hclge_free_cmd_desc can be called without
holding ring->lock. hclge_destroy_cmd_queue() and
hclge_destroy_queue() are unnecessary now, so removes them,
the VF driver has implemented currently.
BTW, the VF driver should set up HCLGEVF_STATE_CMD_DISABLE
as well in the hclgevf_cmd_uninit(), just likes what the PF
driver does.
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.c index af2245e3bb95..f38d236ebf4f 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.c @@ -443,7 +443,7 @@ void hclgevf_cmd_uninit(struct hclgevf_dev *hdev) { spin_lock_bh(&hdev->hw.cmq.csq.lock); spin_lock(&hdev->hw.cmq.crq.lock); - clear_bit(HCLGEVF_STATE_CMD_DISABLE, &hdev->state); + set_bit(HCLGEVF_STATE_CMD_DISABLE, &hdev->state); hclgevf_cmd_uninit_regs(&hdev->hw); spin_unlock(&hdev->hw.cmq.crq.lock); spin_unlock_bh(&hdev->hw.cmq.csq.lock); |