Lines Matching refs:recv_msg

266 	struct ipmi_recv_msg *recv_msg;  member
726 && (intf->seq_table[i].recv_msg)) in clean_up_interface_data()
727 ipmi_free_recv_msg(intf->seq_table[i].recv_msg); in clean_up_interface_data()
1045 struct ipmi_recv_msg *recv_msg, in intf_next_seq() argument
1067 intf->seq_table[i].recv_msg = recv_msg; in intf_next_seq()
1104 struct ipmi_recv_msg **recv_msg) in intf_find_seq() argument
1114 struct ipmi_recv_msg *msg = intf->seq_table[seq].recv_msg; in intf_find_seq()
1119 *recv_msg = msg; in intf_find_seq()
1184 msg = ent->recv_msg; in intf_err_seq()
1365 && (intf->seq_table[i].recv_msg->user == user)) { in _ipmi_destroy_user()
1368 ipmi_free_recv_msg(intf->seq_table[i].recv_msg); in _ipmi_destroy_user()
1914 struct ipmi_recv_msg *recv_msg, in i_ipmi_req_sysintf() argument
1930 memcpy(&recv_msg->addr, smi_addr, sizeof(*smi_addr)); in i_ipmi_req_sysintf()
1967 smi_msg->user_data = recv_msg; in i_ipmi_req_sysintf()
1981 struct ipmi_recv_msg *recv_msg, in i_ipmi_req_ipmb() argument
2032 memcpy(&recv_msg->addr, ipmb_addr, sizeof(*ipmb_addr)); in i_ipmi_req_ipmb()
2034 if (recv_msg->msg.netfn & 0x1) { in i_ipmi_req_ipmb()
2048 smi_msg->user_data = recv_msg; in i_ipmi_req_ipmb()
2068 recv_msg, in i_ipmi_req_ipmb()
2097 memcpy(recv_msg->msg_data, smi_msg->data, in i_ipmi_req_ipmb()
2099 recv_msg->msg.data = recv_msg->msg_data; in i_ipmi_req_ipmb()
2100 recv_msg->msg.data_len = smi_msg->data_size; in i_ipmi_req_ipmb()
2122 struct ipmi_recv_msg *recv_msg, in i_ipmi_req_ipmb_direct() argument
2126 bool is_cmd = !(recv_msg->msg.netfn & 0x1); in i_ipmi_req_ipmb_direct()
2153 smi_msg->data[2] = recv_msg->msgid << 2 | daddr->rq_lun; in i_ipmi_req_ipmb_direct()
2156 smi_msg->data[2] = recv_msg->msgid << 2 | daddr->rs_lun; in i_ipmi_req_ipmb_direct()
2164 smi_msg->user_data = recv_msg; in i_ipmi_req_ipmb_direct()
2174 struct ipmi_recv_msg *recv_msg, in i_ipmi_req_lan() argument
2212 memcpy(&recv_msg->addr, lan_addr, sizeof(*lan_addr)); in i_ipmi_req_lan()
2214 if (recv_msg->msg.netfn & 0x1) { in i_ipmi_req_lan()
2227 smi_msg->user_data = recv_msg; in i_ipmi_req_lan()
2239 recv_msg, in i_ipmi_req_lan()
2267 memcpy(recv_msg->msg_data, smi_msg->data, in i_ipmi_req_lan()
2269 recv_msg->msg.data = recv_msg->msg_data; in i_ipmi_req_lan()
2270 recv_msg->msg.data_len = smi_msg->data_size; in i_ipmi_req_lan()
2308 struct ipmi_recv_msg *recv_msg; in i_ipmi_request() local
2320 recv_msg = supplied_recv; in i_ipmi_request()
2322 recv_msg = ipmi_alloc_recv_msg(); in i_ipmi_request()
2323 if (recv_msg == NULL) { in i_ipmi_request()
2328 recv_msg->user_msg_data = user_msg_data; in i_ipmi_request()
2336 ipmi_free_recv_msg(recv_msg); in i_ipmi_request()
2348 recv_msg->user = user; in i_ipmi_request()
2352 recv_msg->msgid = msgid; in i_ipmi_request()
2357 recv_msg->msg = *msg; in i_ipmi_request()
2361 recv_msg, retries, retry_time_ms); in i_ipmi_request()
2363 rv = i_ipmi_req_ipmb(intf, addr, msgid, msg, smi_msg, recv_msg, in i_ipmi_request()
2368 recv_msg, source_lun); in i_ipmi_request()
2370 rv = i_ipmi_req_lan(intf, addr, msgid, msg, smi_msg, recv_msg, in i_ipmi_request()
2381 ipmi_free_recv_msg(recv_msg); in i_ipmi_request()
3757 deliver_err_response(intf, ent->recv_msg, IPMI_ERR_UNSPECIFIED); in cleanup_smi_msgs()
3816 struct ipmi_recv_msg *recv_msg; in handle_ipmb_get_msg_rsp() local
3848 &recv_msg)) { in handle_ipmb_get_msg_rsp()
3857 memcpy(recv_msg->msg_data, &msg->rsp[9], msg->rsp_size - 9); in handle_ipmb_get_msg_rsp()
3863 recv_msg->msg.netfn = msg->rsp[4] >> 2; in handle_ipmb_get_msg_rsp()
3864 recv_msg->msg.data = recv_msg->msg_data; in handle_ipmb_get_msg_rsp()
3865 recv_msg->msg.data_len = msg->rsp_size - 10; in handle_ipmb_get_msg_rsp()
3866 recv_msg->recv_type = IPMI_RESPONSE_RECV_TYPE; in handle_ipmb_get_msg_rsp()
3867 if (deliver_response(intf, recv_msg)) in handle_ipmb_get_msg_rsp()
3885 struct ipmi_recv_msg *recv_msg; in handle_ipmb_get_msg_cmd() local
3944 recv_msg = ipmi_alloc_recv_msg(); in handle_ipmb_get_msg_cmd()
3945 if (!recv_msg) { in handle_ipmb_get_msg_cmd()
3955 ipmb_addr = (struct ipmi_ipmb_addr *) &recv_msg->addr; in handle_ipmb_get_msg_cmd()
3965 recv_msg->user = user; in handle_ipmb_get_msg_cmd()
3966 recv_msg->recv_type = IPMI_CMD_RECV_TYPE; in handle_ipmb_get_msg_cmd()
3967 recv_msg->msgid = msg->rsp[7] >> 2; in handle_ipmb_get_msg_cmd()
3968 recv_msg->msg.netfn = msg->rsp[4] >> 2; in handle_ipmb_get_msg_cmd()
3969 recv_msg->msg.cmd = msg->rsp[8]; in handle_ipmb_get_msg_cmd()
3970 recv_msg->msg.data = recv_msg->msg_data; in handle_ipmb_get_msg_cmd()
3976 recv_msg->msg.data_len = msg->rsp_size - 10; in handle_ipmb_get_msg_cmd()
3977 memcpy(recv_msg->msg_data, &msg->rsp[9], in handle_ipmb_get_msg_cmd()
3979 if (deliver_response(intf, recv_msg)) in handle_ipmb_get_msg_cmd()
3996 struct ipmi_recv_msg *recv_msg; in handle_ipmb_direct_rcv_cmd() local
4035 recv_msg = ipmi_alloc_recv_msg(); in handle_ipmb_direct_rcv_cmd()
4036 if (!recv_msg) { in handle_ipmb_direct_rcv_cmd()
4046 daddr = (struct ipmi_ipmb_direct_addr *)&recv_msg->addr; in handle_ipmb_direct_rcv_cmd()
4057 recv_msg->user = user; in handle_ipmb_direct_rcv_cmd()
4058 recv_msg->recv_type = IPMI_CMD_RECV_TYPE; in handle_ipmb_direct_rcv_cmd()
4059 recv_msg->msgid = (msg->rsp[2] >> 2); in handle_ipmb_direct_rcv_cmd()
4060 recv_msg->msg.netfn = msg->rsp[0] >> 2; in handle_ipmb_direct_rcv_cmd()
4061 recv_msg->msg.cmd = msg->rsp[3]; in handle_ipmb_direct_rcv_cmd()
4062 recv_msg->msg.data = recv_msg->msg_data; in handle_ipmb_direct_rcv_cmd()
4064 recv_msg->msg.data_len = msg->rsp_size - 4; in handle_ipmb_direct_rcv_cmd()
4065 memcpy(recv_msg->msg_data, msg->rsp + 4, in handle_ipmb_direct_rcv_cmd()
4067 if (deliver_response(intf, recv_msg)) in handle_ipmb_direct_rcv_cmd()
4080 struct ipmi_recv_msg *recv_msg; in handle_ipmb_direct_rcv_rsp() local
4083 recv_msg = msg->user_data; in handle_ipmb_direct_rcv_rsp()
4084 if (recv_msg == NULL) { in handle_ipmb_direct_rcv_rsp()
4090 recv_msg->recv_type = IPMI_RESPONSE_RECV_TYPE; in handle_ipmb_direct_rcv_rsp()
4091 recv_msg->msgid = msg->msgid; in handle_ipmb_direct_rcv_rsp()
4092 daddr = (struct ipmi_ipmb_direct_addr *) &recv_msg->addr; in handle_ipmb_direct_rcv_rsp()
4098 recv_msg->msg.netfn = msg->rsp[0] >> 2; in handle_ipmb_direct_rcv_rsp()
4099 recv_msg->msg.cmd = msg->rsp[3]; in handle_ipmb_direct_rcv_rsp()
4100 memcpy(recv_msg->msg_data, &msg->rsp[4], msg->rsp_size - 4); in handle_ipmb_direct_rcv_rsp()
4101 recv_msg->msg.data = recv_msg->msg_data; in handle_ipmb_direct_rcv_rsp()
4102 recv_msg->msg.data_len = msg->rsp_size - 4; in handle_ipmb_direct_rcv_rsp()
4103 deliver_local_response(intf, recv_msg); in handle_ipmb_direct_rcv_rsp()
4112 struct ipmi_recv_msg *recv_msg; in handle_lan_get_msg_rsp() local
4148 &recv_msg)) { in handle_lan_get_msg_rsp()
4157 memcpy(recv_msg->msg_data, &msg->rsp[11], msg->rsp_size - 11); in handle_lan_get_msg_rsp()
4163 recv_msg->msg.netfn = msg->rsp[6] >> 2; in handle_lan_get_msg_rsp()
4164 recv_msg->msg.data = recv_msg->msg_data; in handle_lan_get_msg_rsp()
4165 recv_msg->msg.data_len = msg->rsp_size - 12; in handle_lan_get_msg_rsp()
4166 recv_msg->recv_type = IPMI_RESPONSE_RECV_TYPE; in handle_lan_get_msg_rsp()
4167 if (deliver_response(intf, recv_msg)) in handle_lan_get_msg_rsp()
4185 struct ipmi_recv_msg *recv_msg; in handle_lan_get_msg_cmd() local
4221 recv_msg = ipmi_alloc_recv_msg(); in handle_lan_get_msg_cmd()
4222 if (!recv_msg) { in handle_lan_get_msg_cmd()
4231 lan_addr = (struct ipmi_lan_addr *) &recv_msg->addr; in handle_lan_get_msg_cmd()
4244 recv_msg->user = user; in handle_lan_get_msg_cmd()
4245 recv_msg->recv_type = IPMI_CMD_RECV_TYPE; in handle_lan_get_msg_cmd()
4246 recv_msg->msgid = msg->rsp[9] >> 2; in handle_lan_get_msg_cmd()
4247 recv_msg->msg.netfn = msg->rsp[6] >> 2; in handle_lan_get_msg_cmd()
4248 recv_msg->msg.cmd = msg->rsp[10]; in handle_lan_get_msg_cmd()
4249 recv_msg->msg.data = recv_msg->msg_data; in handle_lan_get_msg_cmd()
4255 recv_msg->msg.data_len = msg->rsp_size - 12; in handle_lan_get_msg_cmd()
4256 memcpy(recv_msg->msg_data, &msg->rsp[11], in handle_lan_get_msg_cmd()
4258 if (deliver_response(intf, recv_msg)) in handle_lan_get_msg_cmd()
4284 struct ipmi_recv_msg *recv_msg; in handle_oem_get_msg_cmd() local
4329 recv_msg = ipmi_alloc_recv_msg(); in handle_oem_get_msg_cmd()
4330 if (!recv_msg) { in handle_oem_get_msg_cmd()
4346 &recv_msg->addr); in handle_oem_get_msg_cmd()
4351 recv_msg->user = user; in handle_oem_get_msg_cmd()
4352 recv_msg->user_msg_data = NULL; in handle_oem_get_msg_cmd()
4353 recv_msg->recv_type = IPMI_OEM_RECV_TYPE; in handle_oem_get_msg_cmd()
4354 recv_msg->msg.netfn = msg->rsp[0] >> 2; in handle_oem_get_msg_cmd()
4355 recv_msg->msg.cmd = msg->rsp[1]; in handle_oem_get_msg_cmd()
4356 recv_msg->msg.data = recv_msg->msg_data; in handle_oem_get_msg_cmd()
4362 recv_msg->msg.data_len = msg->rsp_size - 4; in handle_oem_get_msg_cmd()
4363 memcpy(recv_msg->msg_data, &msg->rsp[4], in handle_oem_get_msg_cmd()
4365 if (deliver_response(intf, recv_msg)) in handle_oem_get_msg_cmd()
4375 static void copy_event_into_recv_msg(struct ipmi_recv_msg *recv_msg, in copy_event_into_recv_msg() argument
4380 recv_msg->msgid = 0; in copy_event_into_recv_msg()
4381 smi_addr = (struct ipmi_system_interface_addr *) &recv_msg->addr; in copy_event_into_recv_msg()
4385 recv_msg->recv_type = IPMI_ASYNC_EVENT_RECV_TYPE; in copy_event_into_recv_msg()
4386 recv_msg->msg.netfn = msg->rsp[0] >> 2; in copy_event_into_recv_msg()
4387 recv_msg->msg.cmd = msg->rsp[1]; in copy_event_into_recv_msg()
4388 memcpy(recv_msg->msg_data, &msg->rsp[3], msg->rsp_size - 3); in copy_event_into_recv_msg()
4389 recv_msg->msg.data = recv_msg->msg_data; in copy_event_into_recv_msg()
4390 recv_msg->msg.data_len = msg->rsp_size - 3; in copy_event_into_recv_msg()
4396 struct ipmi_recv_msg *recv_msg, *recv_msg2; in handle_read_event_rsp() local
4428 recv_msg = ipmi_alloc_recv_msg(); in handle_read_event_rsp()
4429 if (!recv_msg) { in handle_read_event_rsp()
4431 list_for_each_entry_safe(recv_msg, recv_msg2, &msgs, in handle_read_event_rsp()
4433 list_del(&recv_msg->link); in handle_read_event_rsp()
4434 ipmi_free_recv_msg(recv_msg); in handle_read_event_rsp()
4447 copy_event_into_recv_msg(recv_msg, msg); in handle_read_event_rsp()
4448 recv_msg->user = user; in handle_read_event_rsp()
4450 list_add_tail(&recv_msg->link, &msgs); in handle_read_event_rsp()
4456 list_for_each_entry_safe(recv_msg, recv_msg2, &msgs, link) { in handle_read_event_rsp()
4457 list_del(&recv_msg->link); in handle_read_event_rsp()
4458 deliver_local_response(intf, recv_msg); in handle_read_event_rsp()
4465 recv_msg = ipmi_alloc_recv_msg(); in handle_read_event_rsp()
4466 if (!recv_msg) { in handle_read_event_rsp()
4476 copy_event_into_recv_msg(recv_msg, msg); in handle_read_event_rsp()
4477 list_add_tail(&recv_msg->link, &intf->waiting_events); in handle_read_event_rsp()
4498 struct ipmi_recv_msg *recv_msg; in handle_bmc_rsp() local
4501 recv_msg = msg->user_data; in handle_bmc_rsp()
4502 if (recv_msg == NULL) { in handle_bmc_rsp()
4508 recv_msg->recv_type = IPMI_RESPONSE_RECV_TYPE; in handle_bmc_rsp()
4509 recv_msg->msgid = msg->msgid; in handle_bmc_rsp()
4511 &recv_msg->addr); in handle_bmc_rsp()
4515 recv_msg->msg.netfn = msg->rsp[0] >> 2; in handle_bmc_rsp()
4516 recv_msg->msg.cmd = msg->rsp[1]; in handle_bmc_rsp()
4517 memcpy(recv_msg->msg_data, &msg->rsp[2], msg->rsp_size - 2); in handle_bmc_rsp()
4518 recv_msg->msg.data = recv_msg->msg_data; in handle_bmc_rsp()
4519 recv_msg->msg.data_len = msg->rsp_size - 2; in handle_bmc_rsp()
4520 deliver_local_response(intf, recv_msg); in handle_bmc_rsp()
4646 struct ipmi_recv_msg *recv_msg; in handle_one_recv_msg() local
4655 recv_msg = msg->user_data; in handle_one_recv_msg()
4658 if (!recv_msg) in handle_one_recv_msg()
4661 recv_msg->recv_type = IPMI_RESPONSE_RESPONSE_TYPE; in handle_one_recv_msg()
4662 recv_msg->msg.data = recv_msg->msg_data; in handle_one_recv_msg()
4663 recv_msg->msg_data[0] = cc; in handle_one_recv_msg()
4664 recv_msg->msg.data_len = 1; in handle_one_recv_msg()
4665 deliver_local_response(intf, recv_msg); in handle_one_recv_msg()
4907 smi_from_recv_msg(struct ipmi_smi *intf, struct ipmi_recv_msg *recv_msg, in smi_from_recv_msg() argument
4918 memcpy(smi_msg->data, recv_msg->msg.data, recv_msg->msg.data_len); in smi_from_recv_msg()
4919 smi_msg->data_size = recv_msg->msg.data_len; in smi_from_recv_msg()
4952 msg = ent->recv_msg; in check_msg_timeout()
4956 else if (is_lan_addr(&ent->recv_msg->addr)) in check_msg_timeout()
4972 smi_msg = smi_from_recv_msg(intf, ent->recv_msg, slot, in check_msg_timeout()
4975 if (is_lan_addr(&ent->recv_msg->addr)) in check_msg_timeout()
4994 if (is_lan_addr(&ent->recv_msg->addr)) in check_msg_timeout()
5199 struct ipmi_recv_msg recv_msg; in ipmi_panic_request_and_wait() local
5203 recv_msg.done = dummy_recv_done_handler; in ipmi_panic_request_and_wait()
5212 &recv_msg, in ipmi_panic_request_and_wait()