Commit abe4918a authored by Corey Minyard's avatar Corey Minyard
Browse files

ipmi:si: Move flags get start to its own function



It's about to be used from another place, and this looks better,
anyway.

Signed-off-by: default avatarCorey Minyard <corey@minyard.net>
parent 753bc23d
Loading
Loading
Loading
Loading
+13 −6
Original line number Diff line number Diff line
@@ -390,6 +390,17 @@ static void start_clear_flags(struct smi_info *smi_info)
	smi_info->si_state = SI_CLEARING_FLAGS;
}

static void start_get_flags(struct smi_info *smi_info)
{
	unsigned char msg[2];

	msg[0] = (IPMI_NETFN_APP_REQUEST << 2);
	msg[1] = IPMI_GET_MSG_FLAGS_CMD;

	start_new_msg(smi_info, msg, 2);
	smi_info->si_state = SI_GETTING_FLAGS;
}

static void start_getting_msg_queue(struct smi_info *smi_info)
{
	smi_info->curr_msg->data[0] = (IPMI_NETFN_APP_REQUEST << 2);
@@ -817,11 +828,7 @@ static enum si_sm_result smi_event_handler(struct smi_info *smi_info,
			 * interrupts work with the SMI, that's not really
			 * possible.
			 */
			msg[0] = (IPMI_NETFN_APP_REQUEST << 2);
			msg[1] = IPMI_GET_MSG_FLAGS_CMD;

			start_new_msg(smi_info, msg, 2);
			smi_info->si_state = SI_GETTING_FLAGS;
			start_get_flags(smi_info);
			goto restart;
		}
	}