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

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

So any operation of VF NIC client from HCLGEVF 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/hns3vf/hclgevf_main.c
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h