]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: optimization for CMDQ uninitialization
authorHuazhong Tan <tanhuazhong@huawei.com>
Thu, 19 Dec 2019 06:57:42 +0000 (14:57 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 21 Dec 2019 05:20:39 +0000 (21:20 -0800)
commit13c17cba97c708426d24a4cf9841483b2f85b2fb
treec0913e1d1a727838f516f14c4f9a12504fb3a01c
parent51ac31f34e450040ba21498ead00e4ffc2dbd4b4
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>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.c