Lines Matching refs:ctrl
22 static int handle_loop(struct cfctrl *ctrl, in handle_loop() argument
27 static int handle_loop(struct cfctrl *ctrl,
31 static void cfctrl_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl,
63 struct cfctrl *ctrl = container_obj(layer); in cfctrl_remove() local
65 spin_lock_bh(&ctrl->info_list_lock); in cfctrl_remove()
66 list_for_each_entry_safe(p, tmp, &ctrl->list, list) { in cfctrl_remove()
70 spin_unlock_bh(&ctrl->info_list_lock); in cfctrl_remove()
129 static void cfctrl_insert_req(struct cfctrl *ctrl, in cfctrl_insert_req() argument
132 spin_lock_bh(&ctrl->info_list_lock); in cfctrl_insert_req()
133 atomic_inc(&ctrl->req_seq_no); in cfctrl_insert_req()
134 req->sequence_no = atomic_read(&ctrl->req_seq_no); in cfctrl_insert_req()
135 list_add_tail(&req->list, &ctrl->list); in cfctrl_insert_req()
136 spin_unlock_bh(&ctrl->info_list_lock); in cfctrl_insert_req()
140 static struct cfctrl_request_info *cfctrl_remove_req(struct cfctrl *ctrl, in cfctrl_remove_req() argument
145 first = list_first_entry(&ctrl->list, struct cfctrl_request_info, list); in cfctrl_remove_req()
147 list_for_each_entry_safe(p, tmp, &ctrl->list, list) { in cfctrl_remove_req()
152 atomic_set(&ctrl->rsp_seq_no, in cfctrl_remove_req()
334 struct cfctrl *ctrl = container_obj(layr); in cfctrl_cancel_req() local
336 spin_lock_bh(&ctrl->info_list_lock); in cfctrl_cancel_req()
338 list_for_each_entry_safe(p, tmp, &ctrl->list, list) { in cfctrl_cancel_req()
346 spin_unlock_bh(&ctrl->info_list_lock); in cfctrl_cancel_req()
557 static void cfctrl_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl, in cfctrl_ctrlcmd() argument
561 switch (ctrl) { in cfctrl_ctrlcmd()
592 static int handle_loop(struct cfctrl *ctrl, int cmd, struct cfpkt *pkt) in handle_loop() argument
599 spin_lock_bh(&ctrl->loop_linkid_lock); in handle_loop()
602 if (!ctrl->loop_linkused[linkid]) in handle_loop()
607 if (!ctrl->loop_linkused[linkid]) in handle_loop()
609 spin_unlock_bh(&ctrl->loop_linkid_lock); in handle_loop()
615 if (!ctrl->loop_linkused[linkid]) in handle_loop()
616 ctrl->loop_linkused[linkid] = 1; in handle_loop()
621 spin_unlock_bh(&ctrl->loop_linkid_lock); in handle_loop()
631 spin_lock_bh(&ctrl->loop_linkid_lock); in handle_loop()
633 ctrl->loop_linkused[linkid] = 0; in handle_loop()
634 spin_unlock_bh(&ctrl->loop_linkid_lock); in handle_loop()