Searched refs:hr_cmd (Results 1 – 1 of 1) sorted by relevance
231 struct hns_roce_cmdq *hr_cmd = &hr_dev->cmd; in hns_roce_cmd_use_events() local234 hr_cmd->context = kmalloc_array(hr_cmd->max_cmds, in hns_roce_cmd_use_events()235 sizeof(*hr_cmd->context), in hns_roce_cmd_use_events()237 if (!hr_cmd->context) in hns_roce_cmd_use_events()240 for (i = 0; i < hr_cmd->max_cmds; ++i) { in hns_roce_cmd_use_events()241 hr_cmd->context[i].token = i; in hns_roce_cmd_use_events()242 hr_cmd->context[i].next = i + 1; in hns_roce_cmd_use_events()245 hr_cmd->context[hr_cmd->max_cmds - 1].next = -1; in hns_roce_cmd_use_events()246 hr_cmd->free_head = 0; in hns_roce_cmd_use_events()248 sema_init(&hr_cmd->event_sem, hr_cmd->max_cmds); in hns_roce_cmd_use_events()[all …]