#define DEBUG …
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/ipmi_msgdefs.h>
#include "ipmi_si_sm.h"
#define SMIC_DEBUG_STATES …
#define SMIC_DEBUG_MSG …
#define SMIC_DEBUG_ENABLE …
static int smic_debug = …;
module_param(smic_debug, int, 0644);
MODULE_PARM_DESC(…) …;
enum smic_states { … };
#define MAX_SMIC_READ_SIZE …
#define MAX_SMIC_WRITE_SIZE …
#define SMIC_MAX_ERROR_RETRIES …
#define SMIC_RETRY_TIMEOUT …
#define SMIC_RX_DATA_READY …
#define SMIC_TX_DATA_READY …
#define SMIC_SMI …
#define SMIC_EVM_DATA_AVAIL …
#define SMIC_SMS_DATA_AVAIL …
#define SMIC_FLAG_BSY …
#define EC_NO_ERROR …
#define EC_ABORTED …
#define EC_ILLEGAL_CONTROL …
#define EC_NO_RESPONSE …
#define EC_ILLEGAL_COMMAND …
#define EC_BUFFER_FULL …
struct si_sm_data { … };
static unsigned int init_smic_data(struct si_sm_data *smic,
struct si_sm_io *io)
{ … }
static int start_smic_transaction(struct si_sm_data *smic,
unsigned char *data, unsigned int size)
{ … }
static int smic_get_result(struct si_sm_data *smic,
unsigned char *data, unsigned int length)
{ … }
static inline unsigned char read_smic_flags(struct si_sm_data *smic)
{ … }
static inline unsigned char read_smic_status(struct si_sm_data *smic)
{ … }
static inline unsigned char read_smic_data(struct si_sm_data *smic)
{ … }
static inline void write_smic_flags(struct si_sm_data *smic,
unsigned char flags)
{ … }
static inline void write_smic_control(struct si_sm_data *smic,
unsigned char control)
{ … }
static inline void write_si_sm_data(struct si_sm_data *smic,
unsigned char data)
{ … }
static inline void start_error_recovery(struct si_sm_data *smic, char *reason)
{ … }
static inline void write_next_byte(struct si_sm_data *smic)
{ … }
static inline void read_next_byte(struct si_sm_data *smic)
{ … }
#define SMIC_GET_STATUS …
#define SMIC_READY …
#define SMIC_WR_START …
#define SMIC_WR_NEXT …
#define SMIC_WR_END …
#define SMIC_RD_START …
#define SMIC_RD_NEXT …
#define SMIC_RD_END …
#define SMIC_CODE_MASK …
#define SMIC_CONTROL …
#define SMIC_STATUS …
#define SMIC_CS_MASK …
#define SMIC_SMS …
#define SMIC_SMM …
#define SMIC_STREAM_MASK …
#define SMIC_CC_SMS_GET_STATUS …
#define SMIC_CC_SMS_WR_START …
#define SMIC_CC_SMS_WR_NEXT …
#define SMIC_CC_SMS_WR_END …
#define SMIC_CC_SMS_RD_START …
#define SMIC_CC_SMS_RD_NEXT …
#define SMIC_CC_SMS_RD_END …
#define SMIC_CC_SMM_GET_STATUS …
#define SMIC_CC_SMM_WR_START …
#define SMIC_CC_SMM_WR_NEXT …
#define SMIC_CC_SMM_WR_END …
#define SMIC_CC_SMM_RD_START …
#define SMIC_CC_SMM_RD_NEXT …
#define SMIC_CC_SMM_RD_END …
#define SMIC_SC_SMS_READY …
#define SMIC_SC_SMS_WR_START …
#define SMIC_SC_SMS_WR_NEXT …
#define SMIC_SC_SMS_WR_END …
#define SMIC_SC_SMS_RD_START …
#define SMIC_SC_SMS_RD_NEXT …
#define SMIC_SC_SMS_RD_END …
#define SMIC_SC_SMM_READY …
#define SMIC_SC_SMM_WR_START …
#define SMIC_SC_SMM_WR_NEXT …
#define SMIC_SC_SMM_WR_END …
#define SMIC_SC_SMM_RD_START …
#define SMIC_SC_SMM_RD_NEXT …
#define SMIC_SC_SMM_RD_END …
static enum si_sm_result smic_event(struct si_sm_data *smic, long time)
{ … }
static int smic_detect(struct si_sm_data *smic)
{ … }
static void smic_cleanup(struct si_sm_data *kcs)
{ … }
static int smic_size(void)
{ … }
const struct si_sm_handlers smic_smi_handlers = …;