322{
323 struct ipmi_smi_msg *msg = smi_info->curr_msg;
324
325 if (cCode < 0 || cCode > IPMI_ERR_UNSPECIFIED)
326 cCode = IPMI_ERR_UNSPECIFIED;
327
328
329
330 msg->rsp[0] = msg->data[0] | 4;
331 msg->rsp[1] = msg->data[1];
332 msg->rsp[2] = cCode;
333 msg->rsp_size = 3;
334
335 smi_info->curr_msg = NULL;
336 deliver_recv_msg(smi_info, msg);
337}
338
339static enum si_sm_result start_next_msg(struct smi_info *smi_info)
340{
341 int rv;
342 struct list_head *entry = NULL;
343#ifdef DEBUG_TIMING
344 struct timeval t;
345#endif
346
347
348
349
350
351 if (!smi_info->run_to_completion)
352 spin_lock(&(smi_info->msg_lock));
353
354
355 if (!list_empty(&(smi_info->hp_xmit_msgs))) {
356 entry = smi_info->hp_xmit_msgs.next;
357 } else if (!list_empty(&(smi_info->xmit_msgs))) {
358 entry = smi_info->xmit_msgs.next;
359 }
360
361 if (!entry) {
362 smi_info->curr_msg = NULL;