Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
ipmi_bt_sm.c File Reference
#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"

Go to the source code of this file.

Data Structures

struct  si_sm_data
 

Macros

#define BT_DEBUG_OFF   0 /* Used in production */
 
#define BT_DEBUG_ENABLE   1 /* Generic messages */
 
#define BT_DEBUG_MSG   2 /* Prints all request/response buffers */
 
#define BT_DEBUG_STATES   4 /* Verbose look at state changes */
 
#define BT_NORMAL_TIMEOUT   5 /* seconds */
 
#define BT_NORMAL_RETRY_LIMIT   2
 
#define BT_RESET_DELAY   6 /* seconds after warm reset */
 
#define BT_STATE_CHANGE(X, Y)   { bt->state = X; return Y; }
 
#define BT_SI_SM_RETURN(Y)   { last_printed = BT_STATE_PRINTME; return Y; }
 
#define BT_CLR_WR_PTR   0x01 /* See IPMI 1.5 table 11.6.4 */
 
#define BT_CLR_RD_PTR   0x02
 
#define BT_H2B_ATN   0x04
 
#define BT_B2H_ATN   0x08
 
#define BT_SMS_ATN   0x10
 
#define BT_OEM0   0x20
 
#define BT_H_BUSY   0x40
 
#define BT_B_BUSY   0x80
 
#define BT_STATUS   bt->io->inputb(bt->io, 0)
 
#define BT_CONTROL(x)   bt->io->outputb(bt->io, 0, x)
 
#define BMC2HOST   bt->io->inputb(bt->io, 1)
 
#define HOST2BMC(x)   bt->io->outputb(bt->io, 1, x)
 
#define BT_INTMASK_R   bt->io->inputb(bt->io, 2)
 
#define BT_INTMASK_W(x)   bt->io->outputb(bt->io, 2, x)
 
#define STATE2TXT   state2txt(bt->state)
 
#define STATUS2TXT   status2txt(status)
 
#define BT_BMC_HWRST   0x80
 

Enumerations

enum  bt_states {
  BT_STATE_IDLE = 0, BT_STATE_XACTION_START, BT_STATE_WRITE_BYTES, BT_STATE_WRITE_CONSUME,
  BT_STATE_READ_WAIT, BT_STATE_CLEAR_B2H, BT_STATE_READ_BYTES, BT_STATE_RESET1,
  BT_STATE_RESET2, BT_STATE_RESET3, BT_STATE_RESTART, BT_STATE_PRINTME,
  BT_STATE_CAPABILITIES_BEGIN, BT_STATE_CAPABILITIES_END, BT_STATE_LONG_BUSY
}
 

Functions

 module_param (bt_debug, int, 0644)
 
 MODULE_PARM_DESC (bt_debug,"debug bitmask, 1=enable, 2=messages, 4=states")
 

Variables

struct si_sm_handlers bt_smi_handlers
 

Macro Definition Documentation

#define BMC2HOST   bt->io->inputb(bt->io, 1)

Definition at line 132 of file ipmi_bt_sm.c.

#define BT_B2H_ATN   0x08

Definition at line 115 of file ipmi_bt_sm.c.

#define BT_B_BUSY   0x80

Definition at line 119 of file ipmi_bt_sm.c.

#define BT_BMC_HWRST   0x80

Definition at line 296 of file ipmi_bt_sm.c.

#define BT_CLR_RD_PTR   0x02

Definition at line 113 of file ipmi_bt_sm.c.

#define BT_CLR_WR_PTR   0x01 /* See IPMI 1.5 table 11.6.4 */

Definition at line 112 of file ipmi_bt_sm.c.

#define BT_CONTROL (   x)    bt->io->outputb(bt->io, 0, x)

Definition at line 130 of file ipmi_bt_sm.c.

#define BT_DEBUG_ENABLE   1 /* Generic messages */

Definition at line 37 of file ipmi_bt_sm.c.

#define BT_DEBUG_MSG   2 /* Prints all request/response buffers */

Definition at line 38 of file ipmi_bt_sm.c.

#define BT_DEBUG_OFF   0 /* Used in production */

Definition at line 36 of file ipmi_bt_sm.c.

#define BT_DEBUG_STATES   4 /* Verbose look at state changes */

Definition at line 39 of file ipmi_bt_sm.c.

#define BT_H2B_ATN   0x04

Definition at line 114 of file ipmi_bt_sm.c.

#define BT_H_BUSY   0x40

Definition at line 118 of file ipmi_bt_sm.c.

#define BT_INTMASK_R   bt->io->inputb(bt->io, 2)

Definition at line 135 of file ipmi_bt_sm.c.

#define BT_INTMASK_W (   x)    bt->io->outputb(bt->io, 2, x)

Definition at line 136 of file ipmi_bt_sm.c.

#define BT_NORMAL_RETRY_LIMIT   2

Definition at line 59 of file ipmi_bt_sm.c.

#define BT_NORMAL_TIMEOUT   5 /* seconds */

Definition at line 58 of file ipmi_bt_sm.c.

#define BT_OEM0   0x20

Definition at line 117 of file ipmi_bt_sm.c.

#define BT_RESET_DELAY   6 /* seconds after warm reset */

Definition at line 60 of file ipmi_bt_sm.c.

#define BT_SI_SM_RETURN (   Y)    { last_printed = BT_STATE_PRINTME; return Y; }

Definition at line 92 of file ipmi_bt_sm.c.

#define BT_SMS_ATN   0x10

Definition at line 116 of file ipmi_bt_sm.c.

#define BT_STATE_CHANGE (   X,
 
)    { bt->state = X; return Y; }

Definition at line 90 of file ipmi_bt_sm.c.

#define BT_STATUS   bt->io->inputb(bt->io, 0)

Definition at line 129 of file ipmi_bt_sm.c.

#define HOST2BMC (   x)    bt->io->outputb(bt->io, 1, x)

Definition at line 133 of file ipmi_bt_sm.c.

#define STATE2TXT   state2txt(bt->state)

Definition at line 163 of file ipmi_bt_sm.c.

#define STATUS2TXT   status2txt(status)

Definition at line 190 of file ipmi_bt_sm.c.

Enumeration Type Documentation

enum bt_states
Enumerator:
BT_STATE_IDLE 
BT_STATE_XACTION_START 
BT_STATE_WRITE_BYTES 
BT_STATE_WRITE_CONSUME 
BT_STATE_READ_WAIT 
BT_STATE_CLEAR_B2H 
BT_STATE_READ_BYTES 
BT_STATE_RESET1 
BT_STATE_RESET2 
BT_STATE_RESET3 
BT_STATE_RESTART 
BT_STATE_PRINTME 
BT_STATE_CAPABILITIES_BEGIN 
BT_STATE_CAPABILITIES_END 
BT_STATE_LONG_BUSY 

Definition at line 67 of file ipmi_bt_sm.c.

Function Documentation

module_param ( bt_debug  ,
int  ,
0644   
)
MODULE_PARM_DESC ( bt_debug  ,
"debug  bitmask,
= enable,
= messages 
)

Variable Documentation

struct si_sm_handlers bt_smi_handlers
Initial value:
= {
.init_data = bt_init_data,
.start_transaction = bt_start_transaction,
.get_result = bt_get_result,
.event = bt_event,
.detect = bt_detect,
.cleanup = bt_cleanup,
.size = bt_size,
}

Definition at line 697 of file ipmi_bt_sm.c.