]> asedeno.scripts.mit.edu Git - linux.git/commit
net: hns3: use HCLGE_STATE_NIC_REGISTERED to indicate PF NIC client has registered
authorHuazhong Tan <tanhuazhong@huawei.com>
Tue, 28 May 2019 09:02:54 +0000 (17:02 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 May 2019 00:39:01 +0000 (17:39 -0700)
commitbd9109c9b1f3c34529fe43a4ede46e72d237361b
treeb27fb7f595db149d42b4841f9be0205e55022254
parent33a90e2f20e6c455889a0f41857692221172a5ae
net: hns3: use HCLGE_STATE_NIC_REGISTERED to indicate PF NIC client has registered

When PF NIC client's init_instance() succeeds, it means this client
has been registered successfully, so we use HCLGE_STATE_NIC_REGISTERED
to indicate that. And before calling PF NIC client's uninit_instance(),
we clear this state.

So any operation of PF NIC client from HCLGE is not allowed if this
state is not set.

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>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h