#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/list.h>
#include <linux/wait.h>
#include <linux/spinlock.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/kref.h>
#include <linux/device.h>
#include <linux/input.h>
Go to the source code of this file.
|
void | ibmasm_free_command (struct kref *kref) |
|
struct command * | ibmasm_new_command (struct service_processor *sp, size_t buffer_size) |
|
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) |
|
int | ibmasm_event_buffer_init (struct service_processor *sp) |
|
void | ibmasm_event_buffer_exit (struct service_processor *sp) |
|
void | ibmasm_receive_event (struct service_processor *sp, void *data, unsigned int data_size) |
|
void | ibmasm_event_reader_register (struct service_processor *sp, struct event_reader *reader) |
|
void | ibmasm_event_reader_unregister (struct service_processor *sp, struct event_reader *reader) |
|
int | ibmasm_get_next_event (struct service_processor *sp, struct event_reader *reader) |
|
void | ibmasm_cancel_next_event (struct event_reader *reader) |
|
void | ibmasm_register_panic_notifier (void) |
|
void | ibmasm_unregister_panic_notifier (void) |
|
int | ibmasm_heartbeat_init (struct service_processor *sp) |
|
void | ibmasm_heartbeat_exit (struct service_processor *sp) |
|
void | ibmasm_receive_heartbeat (struct service_processor *sp, void *message, size_t size) |
|
void | ibmasm_init_reverse_heartbeat (struct service_processor *sp, struct reverse_heartbeat *rhb) |
|
int | ibmasm_start_reverse_heartbeat (struct service_processor *sp, struct reverse_heartbeat *rhb) |
|
void | ibmasm_stop_reverse_heartbeat (struct reverse_heartbeat *rhb) |
|
void | ibmasm_receive_message (struct service_processor *sp, void *data, int data_size) |
|
int | ibmasm_send_driver_vpd (struct service_processor *sp) |
|
int | ibmasm_send_os_state (struct service_processor *sp, int os_state) |
|
int | ibmasm_send_i2o_message (struct service_processor *sp) |
|
irqreturn_t | ibmasm_interrupt_handler (int irq, void *dev_id) |
|
void | ibmasm_handle_mouse_interrupt (struct service_processor *sp) |
|
int | ibmasm_init_remote_input_dev (struct service_processor *sp) |
|
void | ibmasm_free_remote_input_dev (struct service_processor *sp) |
|
int | ibmasmfs_register (void) |
|
void | ibmasmfs_unregister (void) |
|
void | ibmasmfs_add_sp (struct service_processor *sp) |
|
#define dbg |
( |
|
STR, |
|
|
|
ARGS... |
|
) |
| |
#define DRIVER_DESC "IBM ASM Service Processor Driver" |
#define DRIVER_NAME "ibmasm" |
#define DRIVER_VERSION "1.0" |
#define HEARTBEAT_BUFFER_SIZE 0x400 |
#define IBMASM_CMD_COMPLETE 1 |
#define IBMASM_CMD_FAILED 2 |
#define IBMASM_CMD_MAX_BUFFER_SIZE 0x8000 |
#define IBMASM_CMD_PENDING 0 |
#define IBMASM_CMD_TIMEOUT_EXTRA 240 |
#define IBMASM_CMD_TIMEOUT_NORMAL 45 |
#define IBMASM_DRIVER_VPD "Lin32 6.08 " |
#define IBMASM_EVENT_MAX_SIZE 2048u |
#define IBMASM_NAME_SIZE 16 |
#define IBMASM_NUM_EVENTS 10 |
#define ibmasm_register_uart |
( |
|
sp | ) |
do { } while(0) |
#define ibmasm_unregister_uart |
( |
|
sp | ) |
do { } while(0) |
#define REVERSE_HEARTBEAT_TIMEOUT 120 |
#define SYSTEM_STATE_OS_DOWN 4 |
#define SYSTEM_STATE_OS_UP 5 |
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.
get_next_event Called by event readers (initiated from user space through the file system). Sleeps until a new event is available.
Definition at line 91 of file event.c.
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.
receive_event Called by the interrupt handler when a dot command of type sp_event is received. Store the event in the circular event buffer, wake up any sleeping event readers. There is no reader marker in the buffer, therefore readers are responsible for keeping up with the writer, or they will lose events.
Definition at line 57 of file event.c.
Dispatch an incoming message to the specific handler for the message. Called from interrupt context.
Definition at line 31 of file dot_command.c.
void ibmasm_register_panic_notifier |
( |
void |
| ) |
|
send the 4.3.5.10 dot command (driver VPD) to the service processor
Definition at line 68 of file dot_command.c.
send the 4.3.6 dot command (os state) to the service processor During driver init this function is called with os state "up". This causes the service processor to start sending heartbeats the driver. During driver exit the function is called with os state "down", causing the service processor to stop the heartbeats.
Definition at line 124 of file dot_command.c.
start_reverse_heartbeat Loop forever, sending a reverse heartbeat dot command to the service processor, then sleeping. The loop comes to an end if the service processor fails to respond 3 times or we were interrupted.
Definition at line 61 of file r_heartbeat.c.
void ibmasm_unregister_panic_notifier |
( |
void |
| ) |
|
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.