Lines Matching refs:recv_msg
262 struct ipmi_recv_msg *recv_msg; member
713 && (intf->seq_table[i].recv_msg)) in clean_up_interface_data()
714 ipmi_free_recv_msg(intf->seq_table[i].recv_msg); in clean_up_interface_data()
1004 struct ipmi_recv_msg *recv_msg, in intf_next_seq() argument
1026 intf->seq_table[i].recv_msg = recv_msg; in intf_next_seq()
1063 struct ipmi_recv_msg **recv_msg) in intf_find_seq() argument
1073 struct ipmi_recv_msg *msg = intf->seq_table[seq].recv_msg; in intf_find_seq()
1078 *recv_msg = msg; in intf_find_seq()
1143 msg = ent->recv_msg; in intf_err_seq()
1315 && (intf->seq_table[i].recv_msg->user == user)) { in _ipmi_destroy_user()
1318 ipmi_free_recv_msg(intf->seq_table[i].recv_msg); in _ipmi_destroy_user()
1862 struct ipmi_recv_msg *recv_msg, in i_ipmi_req_sysintf() argument
1878 memcpy(&recv_msg->addr, smi_addr, sizeof(*smi_addr)); in i_ipmi_req_sysintf()
1915 smi_msg->user_data = recv_msg; in i_ipmi_req_sysintf()
1929 struct ipmi_recv_msg *recv_msg, in i_ipmi_req_ipmb() argument
1980 memcpy(&recv_msg->addr, ipmb_addr, sizeof(*ipmb_addr)); in i_ipmi_req_ipmb()
1982 if (recv_msg->msg.netfn & 0x1) { in i_ipmi_req_ipmb()
1996 smi_msg->user_data = recv_msg; in i_ipmi_req_ipmb()
2016 recv_msg, in i_ipmi_req_ipmb()
2045 memcpy(recv_msg->msg_data, smi_msg->data, in i_ipmi_req_ipmb()
2047 recv_msg->msg.data = recv_msg->msg_data; in i_ipmi_req_ipmb()
2048 recv_msg->msg.data_len = smi_msg->data_size; in i_ipmi_req_ipmb()
2070 struct ipmi_recv_msg *recv_msg, in i_ipmi_req_lan() argument
2108 memcpy(&recv_msg->addr, lan_addr, sizeof(*lan_addr)); in i_ipmi_req_lan()
2110 if (recv_msg->msg.netfn & 0x1) { in i_ipmi_req_lan()
2123 smi_msg->user_data = recv_msg; in i_ipmi_req_lan()
2135 recv_msg, in i_ipmi_req_lan()
2163 memcpy(recv_msg->msg_data, smi_msg->data, in i_ipmi_req_lan()
2165 recv_msg->msg.data = recv_msg->msg_data; in i_ipmi_req_lan()
2166 recv_msg->msg.data_len = smi_msg->data_size; in i_ipmi_req_lan()
2204 struct ipmi_recv_msg *recv_msg; in i_ipmi_request() local
2208 recv_msg = supplied_recv; in i_ipmi_request()
2210 recv_msg = ipmi_alloc_recv_msg(); in i_ipmi_request()
2211 if (recv_msg == NULL) { in i_ipmi_request()
2216 recv_msg->user_msg_data = user_msg_data; in i_ipmi_request()
2224 ipmi_free_recv_msg(recv_msg); in i_ipmi_request()
2236 recv_msg->user = user; in i_ipmi_request()
2240 recv_msg->msgid = msgid; in i_ipmi_request()
2245 recv_msg->msg = *msg; in i_ipmi_request()
2249 recv_msg, retries, retry_time_ms); in i_ipmi_request()
2251 rv = i_ipmi_req_ipmb(intf, addr, msgid, msg, smi_msg, recv_msg, in i_ipmi_request()
2255 rv = i_ipmi_req_lan(intf, addr, msgid, msg, smi_msg, recv_msg, in i_ipmi_request()
2266 ipmi_free_recv_msg(recv_msg); in i_ipmi_request()
3585 deliver_err_response(intf, ent->recv_msg, IPMI_ERR_UNSPECIFIED); in cleanup_smi_msgs()
3638 struct ipmi_recv_msg *recv_msg; in handle_ipmb_get_msg_rsp() local
3670 &recv_msg)) { in handle_ipmb_get_msg_rsp()
3679 memcpy(recv_msg->msg_data, &msg->rsp[9], msg->rsp_size - 9); in handle_ipmb_get_msg_rsp()
3685 recv_msg->msg.netfn = msg->rsp[4] >> 2; in handle_ipmb_get_msg_rsp()
3686 recv_msg->msg.data = recv_msg->msg_data; in handle_ipmb_get_msg_rsp()
3687 recv_msg->msg.data_len = msg->rsp_size - 10; in handle_ipmb_get_msg_rsp()
3688 recv_msg->recv_type = IPMI_RESPONSE_RECV_TYPE; in handle_ipmb_get_msg_rsp()
3689 if (deliver_response(intf, recv_msg)) in handle_ipmb_get_msg_rsp()
3707 struct ipmi_recv_msg *recv_msg; in handle_ipmb_get_msg_cmd() local
3765 recv_msg = ipmi_alloc_recv_msg(); in handle_ipmb_get_msg_cmd()
3766 if (!recv_msg) { in handle_ipmb_get_msg_cmd()
3776 ipmb_addr = (struct ipmi_ipmb_addr *) &recv_msg->addr; in handle_ipmb_get_msg_cmd()
3786 recv_msg->user = user; in handle_ipmb_get_msg_cmd()
3787 recv_msg->recv_type = IPMI_CMD_RECV_TYPE; in handle_ipmb_get_msg_cmd()
3788 recv_msg->msgid = msg->rsp[7] >> 2; in handle_ipmb_get_msg_cmd()
3789 recv_msg->msg.netfn = msg->rsp[4] >> 2; in handle_ipmb_get_msg_cmd()
3790 recv_msg->msg.cmd = msg->rsp[8]; in handle_ipmb_get_msg_cmd()
3791 recv_msg->msg.data = recv_msg->msg_data; in handle_ipmb_get_msg_cmd()
3797 recv_msg->msg.data_len = msg->rsp_size - 10; in handle_ipmb_get_msg_cmd()
3798 memcpy(recv_msg->msg_data, &msg->rsp[9], in handle_ipmb_get_msg_cmd()
3800 if (deliver_response(intf, recv_msg)) in handle_ipmb_get_msg_cmd()
3814 struct ipmi_recv_msg *recv_msg; in handle_lan_get_msg_rsp() local
3850 &recv_msg)) { in handle_lan_get_msg_rsp()
3859 memcpy(recv_msg->msg_data, &msg->rsp[11], msg->rsp_size - 11); in handle_lan_get_msg_rsp()
3865 recv_msg->msg.netfn = msg->rsp[6] >> 2; in handle_lan_get_msg_rsp()
3866 recv_msg->msg.data = recv_msg->msg_data; in handle_lan_get_msg_rsp()
3867 recv_msg->msg.data_len = msg->rsp_size - 12; in handle_lan_get_msg_rsp()
3868 recv_msg->recv_type = IPMI_RESPONSE_RECV_TYPE; in handle_lan_get_msg_rsp()
3869 if (deliver_response(intf, recv_msg)) in handle_lan_get_msg_rsp()
3887 struct ipmi_recv_msg *recv_msg; in handle_lan_get_msg_cmd() local
3923 recv_msg = ipmi_alloc_recv_msg(); in handle_lan_get_msg_cmd()
3924 if (!recv_msg) { in handle_lan_get_msg_cmd()
3933 lan_addr = (struct ipmi_lan_addr *) &recv_msg->addr; in handle_lan_get_msg_cmd()
3946 recv_msg->user = user; in handle_lan_get_msg_cmd()
3947 recv_msg->recv_type = IPMI_CMD_RECV_TYPE; in handle_lan_get_msg_cmd()
3948 recv_msg->msgid = msg->rsp[9] >> 2; in handle_lan_get_msg_cmd()
3949 recv_msg->msg.netfn = msg->rsp[6] >> 2; in handle_lan_get_msg_cmd()
3950 recv_msg->msg.cmd = msg->rsp[10]; in handle_lan_get_msg_cmd()
3951 recv_msg->msg.data = recv_msg->msg_data; in handle_lan_get_msg_cmd()
3957 recv_msg->msg.data_len = msg->rsp_size - 12; in handle_lan_get_msg_cmd()
3958 memcpy(recv_msg->msg_data, &msg->rsp[11], in handle_lan_get_msg_cmd()
3960 if (deliver_response(intf, recv_msg)) in handle_lan_get_msg_cmd()
3986 struct ipmi_recv_msg *recv_msg; in handle_oem_get_msg_cmd() local
4031 recv_msg = ipmi_alloc_recv_msg(); in handle_oem_get_msg_cmd()
4032 if (!recv_msg) { in handle_oem_get_msg_cmd()
4048 &recv_msg->addr); in handle_oem_get_msg_cmd()
4053 recv_msg->user = user; in handle_oem_get_msg_cmd()
4054 recv_msg->user_msg_data = NULL; in handle_oem_get_msg_cmd()
4055 recv_msg->recv_type = IPMI_OEM_RECV_TYPE; in handle_oem_get_msg_cmd()
4056 recv_msg->msg.netfn = msg->rsp[0] >> 2; in handle_oem_get_msg_cmd()
4057 recv_msg->msg.cmd = msg->rsp[1]; in handle_oem_get_msg_cmd()
4058 recv_msg->msg.data = recv_msg->msg_data; in handle_oem_get_msg_cmd()
4064 recv_msg->msg.data_len = msg->rsp_size - 4; in handle_oem_get_msg_cmd()
4065 memcpy(recv_msg->msg_data, &msg->rsp[4], in handle_oem_get_msg_cmd()
4067 if (deliver_response(intf, recv_msg)) in handle_oem_get_msg_cmd()
4077 static void copy_event_into_recv_msg(struct ipmi_recv_msg *recv_msg, in copy_event_into_recv_msg() argument
4082 recv_msg->msgid = 0; in copy_event_into_recv_msg()
4083 smi_addr = (struct ipmi_system_interface_addr *) &recv_msg->addr; in copy_event_into_recv_msg()
4087 recv_msg->recv_type = IPMI_ASYNC_EVENT_RECV_TYPE; in copy_event_into_recv_msg()
4088 recv_msg->msg.netfn = msg->rsp[0] >> 2; in copy_event_into_recv_msg()
4089 recv_msg->msg.cmd = msg->rsp[1]; in copy_event_into_recv_msg()
4090 memcpy(recv_msg->msg_data, &msg->rsp[3], msg->rsp_size - 3); in copy_event_into_recv_msg()
4091 recv_msg->msg.data = recv_msg->msg_data; in copy_event_into_recv_msg()
4092 recv_msg->msg.data_len = msg->rsp_size - 3; in copy_event_into_recv_msg()
4098 struct ipmi_recv_msg *recv_msg, *recv_msg2; in handle_read_event_rsp() local
4130 recv_msg = ipmi_alloc_recv_msg(); in handle_read_event_rsp()
4131 if (!recv_msg) { in handle_read_event_rsp()
4133 list_for_each_entry_safe(recv_msg, recv_msg2, &msgs, in handle_read_event_rsp()
4135 list_del(&recv_msg->link); in handle_read_event_rsp()
4136 ipmi_free_recv_msg(recv_msg); in handle_read_event_rsp()
4149 copy_event_into_recv_msg(recv_msg, msg); in handle_read_event_rsp()
4150 recv_msg->user = user; in handle_read_event_rsp()
4152 list_add_tail(&recv_msg->link, &msgs); in handle_read_event_rsp()
4158 list_for_each_entry_safe(recv_msg, recv_msg2, &msgs, link) { in handle_read_event_rsp()
4159 list_del(&recv_msg->link); in handle_read_event_rsp()
4160 deliver_local_response(intf, recv_msg); in handle_read_event_rsp()
4167 recv_msg = ipmi_alloc_recv_msg(); in handle_read_event_rsp()
4168 if (!recv_msg) { in handle_read_event_rsp()
4178 copy_event_into_recv_msg(recv_msg, msg); in handle_read_event_rsp()
4179 list_add_tail(&recv_msg->link, &intf->waiting_events); in handle_read_event_rsp()
4200 struct ipmi_recv_msg *recv_msg; in handle_bmc_rsp() local
4203 recv_msg = (struct ipmi_recv_msg *) msg->user_data; in handle_bmc_rsp()
4204 if (recv_msg == NULL) { in handle_bmc_rsp()
4210 recv_msg->recv_type = IPMI_RESPONSE_RECV_TYPE; in handle_bmc_rsp()
4211 recv_msg->msgid = msg->msgid; in handle_bmc_rsp()
4213 &recv_msg->addr); in handle_bmc_rsp()
4217 recv_msg->msg.netfn = msg->rsp[0] >> 2; in handle_bmc_rsp()
4218 recv_msg->msg.cmd = msg->rsp[1]; in handle_bmc_rsp()
4219 memcpy(recv_msg->msg_data, &msg->rsp[2], msg->rsp_size - 2); in handle_bmc_rsp()
4220 recv_msg->msg.data = recv_msg->msg_data; in handle_bmc_rsp()
4221 recv_msg->msg.data_len = msg->rsp_size - 2; in handle_bmc_rsp()
4222 deliver_local_response(intf, recv_msg); in handle_bmc_rsp()
4321 struct ipmi_recv_msg *recv_msg = msg->user_data; in handle_one_recv_msg() local
4333 if (!recv_msg) in handle_one_recv_msg()
4336 recv_msg->recv_type = IPMI_RESPONSE_RESPONSE_TYPE; in handle_one_recv_msg()
4337 recv_msg->msg.data = recv_msg->msg_data; in handle_one_recv_msg()
4338 recv_msg->msg.data_len = 1; in handle_one_recv_msg()
4339 recv_msg->msg_data[0] = msg->rsp[2]; in handle_one_recv_msg()
4340 deliver_local_response(intf, recv_msg); in handle_one_recv_msg()
4582 smi_from_recv_msg(struct ipmi_smi *intf, struct ipmi_recv_msg *recv_msg, in smi_from_recv_msg() argument
4593 memcpy(smi_msg->data, recv_msg->msg.data, recv_msg->msg.data_len); in smi_from_recv_msg()
4594 smi_msg->data_size = recv_msg->msg.data_len; in smi_from_recv_msg()
4626 msg = ent->recv_msg; in check_msg_timeout()
4630 else if (is_lan_addr(&ent->recv_msg->addr)) in check_msg_timeout()
4646 smi_msg = smi_from_recv_msg(intf, ent->recv_msg, slot, in check_msg_timeout()
4649 if (is_lan_addr(&ent->recv_msg->addr)) in check_msg_timeout()
4668 if (is_lan_addr(&ent->recv_msg->addr)) in check_msg_timeout()
4868 struct ipmi_recv_msg recv_msg; in ipmi_panic_request_and_wait() local
4872 recv_msg.done = dummy_recv_done_handler; in ipmi_panic_request_and_wait()
4881 &recv_msg, in ipmi_panic_request_and_wait()