Lines Matching refs:cmdnode

205 			  struct cmd_ctrl_node *cmdnode)  in lbtf_queue_cmd()  argument
210 if (!cmdnode) { in lbtf_queue_cmd()
215 if (!cmdnode->cmdbuf->size) { in lbtf_queue_cmd()
220 cmdnode->result = 0; in lbtf_queue_cmd()
222 list_add_tail(&cmdnode->list, &priv->cmdpendingq); in lbtf_queue_cmd()
226 le16_to_cpu(cmdnode->cmdbuf->command)); in lbtf_queue_cmd()
233 struct cmd_ctrl_node *cmdnode) in lbtf_submit_command() argument
244 cmd = cmdnode->cmdbuf; in lbtf_submit_command()
247 priv->cur_cmd = cmdnode; in lbtf_submit_command()
253 lbtf_deb_hex(LBTF_DEB_CMD, "DNLD_CMD", (void *) cmdnode->cmdbuf, cmdsize); in lbtf_submit_command()
276 struct cmd_ctrl_node *cmdnode) in __lbtf_cleanup_and_insert_cmd() argument
280 if (!cmdnode) in __lbtf_cleanup_and_insert_cmd()
283 cmdnode->callback = NULL; in __lbtf_cleanup_and_insert_cmd()
284 cmdnode->callback_arg = 0; in __lbtf_cleanup_and_insert_cmd()
286 memset(cmdnode->cmdbuf, 0, LBS_CMD_BUFFER_SIZE); in __lbtf_cleanup_and_insert_cmd()
288 list_add_tail(&cmdnode->list, &priv->cmdfreeq); in __lbtf_cleanup_and_insert_cmd()
562 struct cmd_ctrl_node *cmdnode = NULL; in lbtf_execute_next_command() local
582 cmdnode = list_first_entry(&priv->cmdpendingq, in lbtf_execute_next_command()
586 if (cmdnode) { in lbtf_execute_next_command()
587 cmd = cmdnode->cmdbuf; in lbtf_execute_next_command()
589 list_del(&cmdnode->list); in lbtf_execute_next_command()
593 lbtf_submit_command(priv, cmdnode); in lbtf_execute_next_command()
609 struct cmd_ctrl_node *cmdnode; in __lbtf_cmd_async() local
615 cmdnode = ERR_PTR(-ENOENT); in __lbtf_cmd_async()
619 cmdnode = lbtf_get_cmd_ctrl_node(priv); in __lbtf_cmd_async()
620 if (cmdnode == NULL) { in __lbtf_cmd_async()
625 cmdnode = ERR_PTR(-ENOBUFS); in __lbtf_cmd_async()
629 cmdnode->callback = callback; in __lbtf_cmd_async()
630 cmdnode->callback_arg = callback_arg; in __lbtf_cmd_async()
633 memcpy(cmdnode->cmdbuf, in_cmd, in_cmd_size); in __lbtf_cmd_async()
637 cmdnode->cmdbuf->command = cpu_to_le16(command); in __lbtf_cmd_async()
638 cmdnode->cmdbuf->size = cpu_to_le16(in_cmd_size); in __lbtf_cmd_async()
639 cmdnode->cmdbuf->seqnum = cpu_to_le16(priv->seqnum); in __lbtf_cmd_async()
640 cmdnode->cmdbuf->result = 0; in __lbtf_cmd_async()
644 cmdnode->cmdwaitqwoken = 0; in __lbtf_cmd_async()
645 lbtf_queue_cmd(priv, cmdnode); in __lbtf_cmd_async()
649 lbtf_deb_leave_args(LBTF_DEB_HOST, "ret %p", cmdnode); in __lbtf_cmd_async()
650 return cmdnode; in __lbtf_cmd_async()
667 struct cmd_ctrl_node *cmdnode; in __lbtf_cmd() local
673 cmdnode = __lbtf_cmd_async(priv, command, in_cmd, in_cmd_size, in __lbtf_cmd()
675 if (IS_ERR(cmdnode)) { in __lbtf_cmd()
676 ret = PTR_ERR(cmdnode); in __lbtf_cmd()
681 ret = wait_event_interruptible(cmdnode->cmdwait_q, in __lbtf_cmd()
682 cmdnode->cmdwaitqwoken); in __lbtf_cmd()
690 ret = cmdnode->result; in __lbtf_cmd()
695 __lbtf_cleanup_and_insert_cmd(priv, cmdnode); in __lbtf_cmd()