/* * exec_command * send a command to a service processor * Commands are executed sequentially. One command (sp->current_command) * is sent to the service processor. Once the interrupt handler gets a * message of type command_response, the message is copied into * the current commands buffer,
*/ void ibmasm_exec_command(struct service_processor *sp, struct command *cmd)
{ unsignedlong flags; char tsbuf[32];
dbg("%s:%d at %s\n", __func__, __LINE__, get_timestamp(tsbuf));
/* * Sleep until a command has failed or a response has been received * and the command status been updated by the interrupt handler. * (see receive_response).
*/ void ibmasm_wait_for_response(struct command *cmd, int timeout)
{
wait_event_interruptible_timeout(cmd->wait,
cmd->status == IBMASM_CMD_COMPLETE ||
cmd->status == IBMASM_CMD_FAILED,
timeout * HZ);
}
/* * receive_command_response * called by the interrupt handler when a dot command of type command_response * was received.
*/ void ibmasm_receive_command_response(struct service_processor *sp, void *response, size_t size)
{ struct command *cmd = sp->current_command;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.