Lines Matching refs:nl_cmd

303 static int tcmu_fail_netlink_cmd(struct tcmu_nl_cmd *nl_cmd)  in tcmu_fail_netlink_cmd()  argument
305 struct tcmu_dev *udev = nl_cmd->udev; in tcmu_fail_netlink_cmd()
312 if (nl_cmd->cmd != TCMU_CMD_UNSPEC) { in tcmu_fail_netlink_cmd()
313 pr_debug("Aborting nl cmd %d on %s\n", nl_cmd->cmd, udev->name); in tcmu_fail_netlink_cmd()
314 nl_cmd->status = -EINTR; in tcmu_fail_netlink_cmd()
315 list_del(&nl_cmd->nl_list); in tcmu_fail_netlink_cmd()
316 complete(&nl_cmd->complete); in tcmu_fail_netlink_cmd()
324 struct tcmu_nl_cmd *nl_cmd, *tmp_cmd; in tcmu_set_reset_netlink() local
338 list_for_each_entry_safe(nl_cmd, tmp_cmd, &tcmu_nl_cmd_list, nl_list) { in tcmu_set_reset_netlink()
339 ret = tcmu_fail_netlink_cmd(nl_cmd); in tcmu_set_reset_netlink()
375 struct tcmu_nl_cmd *nl_cmd; in tcmu_genl_cmd_done() local
388 list_for_each_entry(nl_cmd, &tcmu_nl_cmd_list, nl_list) { in tcmu_genl_cmd_done()
389 if (nl_cmd->udev->se_dev.dev_index == dev_id) { in tcmu_genl_cmd_done()
390 udev = nl_cmd->udev; in tcmu_genl_cmd_done()
401 list_del(&nl_cmd->nl_list); in tcmu_genl_cmd_done()
404 udev->name, dev_id, nl_cmd->cmd, completed_cmd, rc, in tcmu_genl_cmd_done()
405 nl_cmd->status); in tcmu_genl_cmd_done()
407 if (nl_cmd->cmd != completed_cmd) { in tcmu_genl_cmd_done()
409 udev->name, completed_cmd, nl_cmd->cmd); in tcmu_genl_cmd_done()
414 nl_cmd->status = rc; in tcmu_genl_cmd_done()
415 complete(&nl_cmd->complete); in tcmu_genl_cmd_done()
2005 struct tcmu_nl_cmd *nl_cmd = &udev->curr_nl_cmd; in tcmu_init_genl_cmd_reply() local
2022 if (nl_cmd->cmd != TCMU_CMD_UNSPEC) { in tcmu_init_genl_cmd_reply()
2025 nl_cmd->cmd, udev->name); in tcmu_init_genl_cmd_reply()
2029 memset(nl_cmd, 0, sizeof(*nl_cmd)); in tcmu_init_genl_cmd_reply()
2030 nl_cmd->cmd = cmd; in tcmu_init_genl_cmd_reply()
2031 nl_cmd->udev = udev; in tcmu_init_genl_cmd_reply()
2032 init_completion(&nl_cmd->complete); in tcmu_init_genl_cmd_reply()
2033 INIT_LIST_HEAD(&nl_cmd->nl_list); in tcmu_init_genl_cmd_reply()
2035 list_add_tail(&nl_cmd->nl_list, &tcmu_nl_cmd_list); in tcmu_init_genl_cmd_reply()
2043 struct tcmu_nl_cmd *nl_cmd = &udev->curr_nl_cmd; in tcmu_destroy_genl_cmd_reply() local
2053 list_del(&nl_cmd->nl_list); in tcmu_destroy_genl_cmd_reply()
2054 memset(nl_cmd, 0, sizeof(*nl_cmd)); in tcmu_destroy_genl_cmd_reply()
2061 struct tcmu_nl_cmd *nl_cmd = &udev->curr_nl_cmd; in tcmu_wait_genl_cmd_reply() local
2071 wait_for_completion(&nl_cmd->complete); in tcmu_wait_genl_cmd_reply()
2074 nl_cmd->cmd = TCMU_CMD_UNSPEC; in tcmu_wait_genl_cmd_reply()
2075 ret = nl_cmd->status; in tcmu_wait_genl_cmd_reply()