int ret = 0;
u16 i;
- if (!client)
+ if (!test_bit(HCLGE_STATE_ROCE_REGISTERED, &hdev->state) ||
+ !client)
return 0;
if (!client->ops->reset_notify)
if (ret)
goto clear_roce;
+ set_bit(HCLGE_STATE_ROCE_REGISTERED,
+ &hdev->state);
hnae3_set_client_init_flag(hdev->roce_client,
ae_dev, 1);
}
if (ret)
goto clear_roce;
+ set_bit(HCLGE_STATE_ROCE_REGISTERED,
+ &hdev->state);
hnae3_set_client_init_flag(client, ae_dev, 1);
}
for (i = 0; i < hdev->num_vmdq_vport + 1; i++) {
vport = &hdev->vport[i];
if (hdev->roce_client) {
+ clear_bit(HCLGE_STATE_ROCE_REGISTERED, &hdev->state);
hdev->roce_client->ops->uninit_instance(&vport->roce,
0);
hdev->roce_client = NULL;
HCLGE_STATE_DISABLED,
HCLGE_STATE_REMOVING,
HCLGE_STATE_NIC_REGISTERED,
+ HCLGE_STATE_ROCE_REGISTERED,
HCLGE_STATE_SERVICE_INITED,
HCLGE_STATE_SERVICE_SCHED,
HCLGE_STATE_RST_SERVICE_SCHED,