#define DEBUG …
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/string.h>
#include <linux/jiffies.h>
#include <linux/ipmi_msgdefs.h>
#include "ipmi_si_sm.h"
#define KCS_DEBUG_STATES …
#define KCS_DEBUG_MSG …
#define KCS_DEBUG_ENABLE …
static int kcs_debug;
module_param(kcs_debug, int, 0644);
MODULE_PARM_DESC(…) …;
enum kcs_states { … };
#define MAX_KCS_READ_SIZE …
#define MAX_KCS_WRITE_SIZE …
#define IBF_RETRY_TIMEOUT …
#define OBF_RETRY_TIMEOUT …
#define MAX_ERROR_RETRIES …
#define ERROR0_OBF_WAIT_JIFFIES …
struct si_sm_data { … };
static unsigned int init_kcs_data_with_state(struct si_sm_data *kcs,
struct si_sm_io *io, enum kcs_states state)
{ … }
static unsigned int init_kcs_data(struct si_sm_data *kcs,
struct si_sm_io *io)
{ … }
static inline unsigned char read_status(struct si_sm_data *kcs)
{ … }
static inline unsigned char read_data(struct si_sm_data *kcs)
{ … }
static inline void write_cmd(struct si_sm_data *kcs, unsigned char data)
{ … }
static inline void write_data(struct si_sm_data *kcs, unsigned char data)
{ … }
#define KCS_GET_STATUS_ABORT …
#define KCS_WRITE_START …
#define KCS_WRITE_END …
#define KCS_READ_BYTE …
#define GET_STATUS_STATE(status) …
#define KCS_IDLE_STATE …
#define KCS_READ_STATE …
#define KCS_WRITE_STATE …
#define KCS_ERROR_STATE …
#define GET_STATUS_ATN(status) …
#define GET_STATUS_IBF(status) …
#define GET_STATUS_OBF(status) …
static inline void write_next_byte(struct si_sm_data *kcs)
{ … }
static inline void start_error_recovery(struct si_sm_data *kcs, char *reason)
{ … }
static inline void read_next_byte(struct si_sm_data *kcs)
{ … }
static inline int check_ibf(struct si_sm_data *kcs, unsigned char status,
long time)
{ … }
static inline int check_obf(struct si_sm_data *kcs, unsigned char status,
long time)
{ … }
static void clear_obf(struct si_sm_data *kcs, unsigned char status)
{ … }
static void restart_kcs_transaction(struct si_sm_data *kcs)
{ … }
static int start_kcs_transaction(struct si_sm_data *kcs, unsigned char *data,
unsigned int size)
{ … }
static int get_kcs_result(struct si_sm_data *kcs, unsigned char *data,
unsigned int length)
{ … }
static enum si_sm_result kcs_event(struct si_sm_data *kcs, long time)
{ … }
static int kcs_size(void)
{ … }
static int kcs_detect(struct si_sm_data *kcs)
{ … }
static void kcs_cleanup(struct si_sm_data *kcs)
{ … }
const struct si_sm_handlers kcs_smi_handlers = …;