Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
ctcm_fsms.c File Reference
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/interrupt.h>
#include <linux/timer.h>
#include <linux/bitops.h>
#include <linux/signal.h>
#include <linux/string.h>
#include <linux/ip.h>
#include <linux/if_arp.h>
#include <linux/tcp.h>
#include <linux/skbuff.h>
#include <linux/ctype.h>
#include <net/dst.h>
#include <linux/io.h>
#include <asm/ccwdev.h>
#include <asm/ccwgroup.h>
#include <linux/uaccess.h>
#include <asm/idals.h>
#include "fsm.h"
#include "ctcm_dbug.h"
#include "ctcm_main.h"
#include "ctcm_fsms.h"

Go to the source code of this file.

Macros

#define KMSG_COMPONENT   "ctcm"
 
#define pr_fmt(fmt)   KMSG_COMPONENT ": " fmt
 

Functions

void ctcm_ccw_check_rc (struct channel *ch, int rc, char *msg)
 
void ctcm_purge_skb_queue (struct sk_buff_head *q)
 
void ctcm_chx_txidle (fsm_instance *fi, int event, void *arg)
 
void ctcmpc_chx_rxidle (fsm_instance *fi, int event, void *arg)
 

Variables

const chardev_state_names []
 
const chardev_event_names []
 
const charctc_ch_event_names []
 
const charctc_ch_state_names []
 
const fsm_node ch_fsm []
 
int ch_fsm_len = ARRAY_SIZE(ch_fsm)
 
const fsm_node ctcmpc_ch_fsm []
 
int mpc_ch_fsm_len = ARRAY_SIZE(ctcmpc_ch_fsm)
 
const fsm_node dev_fsm []
 
int dev_fsm_len = ARRAY_SIZE(dev_fsm)
 

Macro Definition Documentation

#define KMSG_COMPONENT   "ctcm"

Definition at line 14 of file ctcm_fsms.c.

#define pr_fmt (   fmt)    KMSG_COMPONENT ": " fmt

Definition at line 15 of file ctcm_fsms.c.

Function Documentation

void ctcm_ccw_check_rc ( struct channel ch,
int  rc,
char msg 
)

Check return code of a preceding ccw_device call, halt_IO etc...

ch : The channel, the error belongs to. Returns the error code (!= 0) to inspect.

Definition at line 190 of file ctcm_fsms.c.

void ctcm_chx_txidle ( fsm_instance fi,
int  event,
void arg 
)

Initial data is sent. Notify device statemachine that we are up and running.

fi An instance of a channel statemachine. event The event, just happened. arg Generic pointer, casted from channel * upon call.

Definition at line 336 of file ctcm_fsms.c.

void ctcm_purge_skb_queue ( struct sk_buff_head q)

Definition at line 213 of file ctcm_fsms.c.

void ctcmpc_chx_rxidle ( fsm_instance fi,
int  event,
void arg 
)

Got initial data, check it. If OK, notify device statemachine that we are up and running.

fi An instance of a channel statemachine. event The event, just happened. arg Generic pointer, casted from channel * upon call.

Definition at line 1546 of file ctcm_fsms.c.

Variable Documentation

const fsm_node ch_fsm[]

Definition at line 1095 of file ctcm_fsms.c.

int ch_fsm_len = ARRAY_SIZE(ch_fsm)

Definition at line 1193 of file ctcm_fsms.c.

const char* ctc_ch_event_names[]
Initial value:
= {
[CTC_EVENT_IO_SUCCESS] = "ccw_device success",
[CTC_EVENT_IO_EBUSY] = "ccw_device busy",
[CTC_EVENT_IO_ENODEV] = "ccw_device enodev",
[CTC_EVENT_IO_UNKNOWN] = "ccw_device unknown",
[CTC_EVENT_ATTNBUSY] = "Status ATTN & BUSY",
[CTC_EVENT_ATTN] = "Status ATTN",
[CTC_EVENT_BUSY] = "Status BUSY",
[CTC_EVENT_UC_RCRESET] = "Unit check remote reset",
[CTC_EVENT_UC_RSRESET] = "Unit check remote system reset",
[CTC_EVENT_UC_TXTIMEOUT] = "Unit check TX timeout",
[CTC_EVENT_UC_TXPARITY] = "Unit check TX parity",
[CTC_EVENT_UC_HWFAIL] = "Unit check Hardware failure",
[CTC_EVENT_UC_RXPARITY] = "Unit check RX parity",
[CTC_EVENT_UC_ZERO] = "Unit check ZERO",
[CTC_EVENT_UC_UNKNOWN] = "Unit check Unknown",
[CTC_EVENT_SC_UNKNOWN] = "SubChannel check Unknown",
[CTC_EVENT_MC_FAIL] = "Machine check failure",
[CTC_EVENT_MC_GOOD] = "Machine check operational",
[CTC_EVENT_IRQ] = "IRQ normal",
[CTC_EVENT_FINSTAT] = "IRQ final",
[CTC_EVENT_TIMER] = "Timer",
[CTC_EVENT_START] = "Start",
[CTC_EVENT_STOP] = "Stop",
[CTC_EVENT_SEND_XID] = "XID Exchange",
[CTC_EVENT_RSWEEP_TIMER] = "MPC Group Sweep Timer",
}

Definition at line 71 of file ctcm_fsms.c.

const char* ctc_ch_state_names[]
Initial value:
= {
[CTC_STATE_IDLE] = "Idle",
[CTC_STATE_STOPPED] = "Stopped",
[CTC_STATE_STARTWAIT] = "StartWait",
[CTC_STATE_STARTRETRY] = "StartRetry",
[CTC_STATE_SETUPWAIT] = "SetupWait",
[CTC_STATE_RXINIT] = "RX init",
[CTC_STATE_TXINIT] = "TX init",
[CTC_STATE_RX] = "RX",
[CTC_STATE_TX] = "TX",
[CTC_STATE_RXIDLE] = "RX idle",
[CTC_STATE_TXIDLE] = "TX idle",
[CTC_STATE_RXERR] = "RX error",
[CTC_STATE_TXERR] = "TX error",
[CTC_STATE_TERM] = "Terminating",
[CTC_STATE_DTERM] = "Restarting",
[CTC_STATE_NOTOP] = "Not operational",
[CH_XID0_PENDING] = "Pending XID0 Start",
[CH_XID0_INPROGRESS] = "In XID0 Negotiations ",
[CH_XID7_PENDING] = "Pending XID7 P1 Start",
[CH_XID7_PENDING1] = "Active XID7 P1 Exchange ",
[CH_XID7_PENDING2] = "Pending XID7 P2 Start ",
[CH_XID7_PENDING3] = "Active XID7 P2 Exchange ",
[CH_XID7_PENDING4] = "XID7 Complete - Pending READY ",
}

Definition at line 102 of file ctcm_fsms.c.

const fsm_node ctcmpc_ch_fsm[]

Definition at line 1858 of file ctcm_fsms.c.

const char* dev_event_names[]
Initial value:
= {
[DEV_EVENT_START] = "Start",
[DEV_EVENT_STOP] = "Stop",
[DEV_EVENT_RXUP] = "RX up",
[DEV_EVENT_TXUP] = "TX up",
[DEV_EVENT_RXDOWN] = "RX down",
[DEV_EVENT_TXDOWN] = "TX down",
[DEV_EVENT_RESTART] = "Restart",
}

Definition at line 61 of file ctcm_fsms.c.

const fsm_node dev_fsm[]

Definition at line 2261 of file ctcm_fsms.c.

int dev_fsm_len = ARRAY_SIZE(dev_fsm)

Definition at line 2301 of file ctcm_fsms.c.

const char* dev_state_names[]
Initial value:
= {
[DEV_STATE_STOPPED] = "Stopped",
[DEV_STATE_STARTWAIT_RXTX] = "StartWait RXTX",
[DEV_STATE_STARTWAIT_RX] = "StartWait RX",
[DEV_STATE_STARTWAIT_TX] = "StartWait TX",
[DEV_STATE_STOPWAIT_RXTX] = "StopWait RXTX",
[DEV_STATE_STOPWAIT_RX] = "StopWait RX",
[DEV_STATE_STOPWAIT_TX] = "StopWait TX",
[DEV_STATE_RUNNING] = "Running",
}

Definition at line 50 of file ctcm_fsms.c.

int mpc_ch_fsm_len = ARRAY_SIZE(ctcmpc_ch_fsm)

Definition at line 2059 of file ctcm_fsms.c.