Lines Matching refs:cl

148 void mei_hbm_cl_hdr(struct mei_cl *cl, u8 hbm_cmd, void *buf, size_t len)  in mei_hbm_cl_hdr()  argument
155 cmd->host_addr = mei_cl_host_addr(cl); in mei_hbm_cl_hdr()
156 cmd->me_addr = mei_cl_me_id(cl); in mei_hbm_cl_hdr()
171 struct mei_cl *cl, u8 hbm_cmd, size_t len) in mei_hbm_cl_write() argument
176 mei_hbm_cl_hdr(cl, hbm_cmd, dev->wr_msg.data, len); in mei_hbm_cl_write()
191 bool mei_hbm_cl_addr_equal(struct mei_cl *cl, struct mei_hbm_cl_cmd *cmd) in mei_hbm_cl_addr_equal() argument
193 return mei_cl_host_addr(cl) == cmd->host_addr && in mei_hbm_cl_addr_equal()
194 mei_cl_me_id(cl) == cmd->me_addr; in mei_hbm_cl_addr_equal()
209 struct mei_cl *cl; in mei_hbm_cl_find_by_cmd() local
211 list_for_each_entry(cl, &dev->file_list, link) in mei_hbm_cl_find_by_cmd()
212 if (mei_hbm_cl_addr_equal(cl, cmd)) in mei_hbm_cl_find_by_cmd()
213 return cl; in mei_hbm_cl_find_by_cmd()
417 struct mei_cl *cl, u8 start) in mei_hbm_cl_notify_req() argument
426 mei_hbm_cl_hdr(cl, MEI_HBM_NOTIFY_REQ_CMD, dev->wr_msg.data, len); in mei_hbm_cl_notify_req()
463 struct mei_cl *cl, in mei_hbm_cl_notify_start_res() argument
469 cl_dbg(dev, cl, "hbm: notify start response status=%d\n", rs->status); in mei_hbm_cl_notify_start_res()
473 cl->notify_en = true; in mei_hbm_cl_notify_start_res()
474 cl->status = 0; in mei_hbm_cl_notify_start_res()
476 cl->status = -EINVAL; in mei_hbm_cl_notify_start_res()
489 struct mei_cl *cl, in mei_hbm_cl_notify_stop_res() argument
495 cl_dbg(dev, cl, "hbm: notify stop response status=%d\n", rs->status); in mei_hbm_cl_notify_stop_res()
499 cl->notify_en = false; in mei_hbm_cl_notify_stop_res()
500 cl->status = 0; in mei_hbm_cl_notify_stop_res()
503 cl->status = -EINVAL; in mei_hbm_cl_notify_stop_res()
516 struct mei_cl *cl; in mei_hbm_cl_notify() local
518 cl = mei_hbm_cl_find_by_cmd(dev, cmd); in mei_hbm_cl_notify()
519 if (cl) in mei_hbm_cl_notify()
520 mei_cl_notify(cl); in mei_hbm_cl_notify()
635 int mei_hbm_cl_flow_control_req(struct mei_device *dev, struct mei_cl *cl) in mei_hbm_cl_flow_control_req() argument
639 cl_dbg(dev, cl, "sending flow control\n"); in mei_hbm_cl_flow_control_req()
640 return mei_hbm_cl_write(dev, cl, MEI_FLOW_CONTROL_CMD, len); in mei_hbm_cl_flow_control_req()
688 struct mei_cl *cl; in mei_hbm_cl_flow_control_res() local
696 cl = mei_hbm_cl_find_by_cmd(dev, flow_control); in mei_hbm_cl_flow_control_res()
697 if (cl) { in mei_hbm_cl_flow_control_res()
698 cl->mei_flow_ctrl_creds++; in mei_hbm_cl_flow_control_res()
699 cl_dbg(dev, cl, "flow control creds = %d.\n", in mei_hbm_cl_flow_control_res()
700 cl->mei_flow_ctrl_creds); in mei_hbm_cl_flow_control_res()
713 int mei_hbm_cl_disconnect_req(struct mei_device *dev, struct mei_cl *cl) in mei_hbm_cl_disconnect_req() argument
717 return mei_hbm_cl_write(dev, cl, CLIENT_DISCONNECT_REQ_CMD, len); in mei_hbm_cl_disconnect_req()
728 int mei_hbm_cl_disconnect_rsp(struct mei_device *dev, struct mei_cl *cl) in mei_hbm_cl_disconnect_rsp() argument
732 return mei_hbm_cl_write(dev, cl, CLIENT_DISCONNECT_RES_CMD, len); in mei_hbm_cl_disconnect_rsp()
743 static void mei_hbm_cl_disconnect_res(struct mei_device *dev, struct mei_cl *cl, in mei_hbm_cl_disconnect_res() argument
749 cl_dbg(dev, cl, "hbm: disconnect response status=%d\n", rs->status); in mei_hbm_cl_disconnect_res()
752 cl->state = MEI_FILE_DISCONNECT_REPLY; in mei_hbm_cl_disconnect_res()
753 cl->status = 0; in mei_hbm_cl_disconnect_res()
764 int mei_hbm_cl_connect_req(struct mei_device *dev, struct mei_cl *cl) in mei_hbm_cl_connect_req() argument
768 return mei_hbm_cl_write(dev, cl, CLIENT_CONNECT_REQ_CMD, len); in mei_hbm_cl_connect_req()
779 static void mei_hbm_cl_connect_res(struct mei_device *dev, struct mei_cl *cl, in mei_hbm_cl_connect_res() argument
785 cl_dbg(dev, cl, "hbm: connect response status=%s\n", in mei_hbm_cl_connect_res()
789 cl->state = MEI_FILE_CONNECTED; in mei_hbm_cl_connect_res()
791 cl->state = MEI_FILE_DISCONNECT_REPLY; in mei_hbm_cl_connect_res()
793 mei_me_cl_del(dev, cl->me_cl); in mei_hbm_cl_connect_res()
795 cl->status = mei_cl_conn_status_to_errno(rs->status); in mei_hbm_cl_connect_res()
810 struct mei_cl *cl; in mei_hbm_cl_res() local
813 cl = NULL; in mei_hbm_cl_res()
816 cl = cb->cl; in mei_hbm_cl_res()
821 if (mei_hbm_cl_addr_equal(cl, rs)) { in mei_hbm_cl_res()
827 if (!cl) in mei_hbm_cl_res()
832 mei_hbm_cl_connect_res(dev, cl, rs); in mei_hbm_cl_res()
835 mei_hbm_cl_disconnect_res(dev, cl, rs); in mei_hbm_cl_res()
838 mei_hbm_cl_notify_start_res(dev, cl, rs); in mei_hbm_cl_res()
841 mei_hbm_cl_notify_stop_res(dev, cl, rs); in mei_hbm_cl_res()
847 cl->timer_count = 0; in mei_hbm_cl_res()
848 wake_up(&cl->wait); in mei_hbm_cl_res()
864 struct mei_cl *cl; in mei_hbm_fw_disconnect_req() local
867 cl = mei_hbm_cl_find_by_cmd(dev, disconnect_req); in mei_hbm_fw_disconnect_req()
868 if (cl) { in mei_hbm_fw_disconnect_req()
869 cl_dbg(dev, cl, "fw disconnect request received\n"); in mei_hbm_fw_disconnect_req()
870 cl->state = MEI_FILE_DISCONNECTING; in mei_hbm_fw_disconnect_req()
871 cl->timer_count = 0; in mei_hbm_fw_disconnect_req()
873 cb = mei_io_cb_init(cl, MEI_FOP_DISCONNECT_RSP, NULL); in mei_hbm_fw_disconnect_req()