Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
command.c File Reference
#include <linux/sched.h>
#include <linux/slab.h>
#include "ibmasm.h"
#include "lowlevel.h"

Go to the source code of this file.

Functions

struct commandibmasm_new_command (struct service_processor *sp, size_t buffer_size)
 
void ibmasm_free_command (struct kref *kref)
 
void ibmasm_exec_command (struct service_processor *sp, struct command *cmd)
 
void ibmasm_wait_for_response (struct command *cmd, int timeout)
 
void ibmasm_receive_command_response (struct service_processor *sp, void *response, size_t size)
 

Function Documentation

void ibmasm_exec_command ( struct service_processor sp,
struct command cmd 
)

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,

Definition at line 119 of file command.c.

void ibmasm_free_command ( struct kref kref)

Definition at line 66 of file command.c.

struct command* ibmasm_new_command ( struct service_processor sp,
size_t  buffer_size 
)
read

Definition at line 34 of file command.c.

void ibmasm_receive_command_response ( struct service_processor sp,
void response,
size_t  size 
)

receive_command_response called by the interrupt handler when a dot command of type command_response was received.

Definition at line 175 of file command.c.

void ibmasm_wait_for_response ( struct command cmd,
int  timeout 
)

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).

Definition at line 162 of file command.c.