Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
ctcm_mpc.h File Reference
#include <linux/interrupt.h>
#include <linux/skbuff.h>
#include "fsm.h"

Go to the source code of this file.

Data Structures

struct  xid2
 
struct  th_header
 
struct  th_addon
 
struct  th_sweep
 
struct  pdu
 
struct  qllc
 
struct  mpcg_info
 
struct  mpc_group
 

Macros

#define ETH_P_SNA_DIX   0x80D5
 
#define ALLZEROS   0x0000000000000000
 
#define XID_FM2   0x20
 
#define XID2_0   0x00
 
#define XID2_7   0x07
 
#define XID2_WRITE_SIDE   0x04
 
#define XID2_READ_SIDE   0x05
 
#define XID2_LENGTH   (sizeof(struct xid2))
 
#define TH_HAS_PDU   0xf0
 
#define TH_IS_XID   0x01
 
#define TH_SWEEP_REQ   0xfe
 
#define TH_SWEEP_RESP   0xff
 
#define TH_DATA_IS_XID   0x80
 
#define TH_RETRY   0x40
 
#define TH_DISCONTACT   0xc0
 
#define TH_SEG_BLK   0x20
 
#define TH_LAST_SEG   0x10
 
#define TH_PDU_PART   0x08
 
#define TH_HEADER_LENGTH   (sizeof(struct th_header))
 
#define TH_SWEEP_LENGTH   (sizeof(struct th_sweep))
 
#define PDU_LAST   0x80
 
#define PDU_CNTL   0x40
 
#define PDU_FIRST   0x20
 
#define PDU_HEADER_LENGTH   (sizeof(struct pdu))
 
#define QLLC_REQ   0xFF
 
#define QLLC_RESP   0x00
 
#define QLLC_DISCONNECT   0x53
 
#define QLLC_UNSEQACK   0x73
 
#define QLLC_SETMODE   0x93
 
#define QLLC_EXCHID   0xBF
 
#define MAX_MPCGCHAN   10
 
#define MPC_XID_TIMEOUT_VALUE   10000
 
#define MPC_CHANNEL_ADD   0
 
#define MPC_CHANNEL_REMOVE   1
 
#define MPC_CHANNEL_ATTN   2
 
#define XSIDE   1
 
#define YSIDE   0
 

Functions

int ctc_mpc_alloc_channel (int port, void(*callback)(int port_num, int max_write_size))
 
void ctc_mpc_establish_connectivity (int port, void(*callback)(int port_num, int rc, int max_write_size))
 
void ctc_mpc_dealloc_ch (int port)
 
void ctc_mpc_flow_control (int port, int flowc)
 
struct xid2 __attribute__ ((packed))
 
int ctcmpc_open (struct net_device *)
 
void ctcm_ccw_check_rc (struct channel *, int, char *)
 
void mpc_group_ready (unsigned long adev)
 
void mpc_channel_action (struct channel *ch, int direction, int action)
 
void mpc_action_send_discontact (unsigned long thischan)
 
void mpc_action_discontact (fsm_instance *fi, int event, void *arg)
 
void ctcmpc_bh (unsigned long thischan)
 

Variables

__u8 xid2_type_id
 
__u8 xid2_len
 
__u32 xid2_adj_id
 
__u8 xid2_rlen
 
__u8 xid2_resv1
 
__u8 xid2_flag1
 
__u8 xid2_fmtt
 
__u8 xid2_flag4
 
__u16 xid2_resv2
 
__u8 xid2_tgnum
 
__u32 xid2_sender_id
 
__u8 xid2_flag2
 
__u8 xid2_option
 
char xid2_resv3 [8]
 
__u16 xid2_resv4
 
__u8 xid2_dlc_type
 
__u16 xid2_resv5
 
__u8 xid2_mpc_flag
 
__u8 xid2_resv6
 
__u16 xid2_buf_len
 
char xid2_buffer [255-(13 *sizeof(__u8)+2 *sizeof(__u32)+4 *sizeof(__u16)+8 *sizeof(char))]
 
__u8 th_seg
 
__u8 th_ch_flag
 
__u8 th_blk_flag
 
__u8 th_is_xid
 
__u32 th_seq_num
 
__u32 th_last_seq
 
__u32 th_resvd
 
struct th_header th
 
struct th_addon sw
 
__u32 pdu_offset
 
__u8 pdu_flag
 
__u8 pdu_proto
 
__u16 pdu_seq
 
__u8 qllc_address
 
__u8 qllc_commands
 
struct mpcg_info __attribute__
 

Macro Definition Documentation

#define ALLZEROS   0x0000000000000000

Definition at line 44 of file ctcm_mpc.h.

#define ETH_P_SNA_DIX   0x80D5

Definition at line 38 of file ctcm_mpc.h.

#define MAX_MPCGCHAN   10

Definition at line 141 of file ctcm_mpc.h.

#define MPC_CHANNEL_ADD   0

Definition at line 143 of file ctcm_mpc.h.

#define MPC_CHANNEL_ATTN   2

Definition at line 145 of file ctcm_mpc.h.

#define MPC_CHANNEL_REMOVE   1

Definition at line 144 of file ctcm_mpc.h.

#define MPC_XID_TIMEOUT_VALUE   10000

Definition at line 142 of file ctcm_mpc.h.

#define PDU_CNTL   0x40

Definition at line 113 of file ctcm_mpc.h.

#define PDU_FIRST   0x20

Definition at line 114 of file ctcm_mpc.h.

#define PDU_HEADER_LENGTH   (sizeof(struct pdu))

Definition at line 123 of file ctcm_mpc.h.

#define PDU_LAST   0x80

Definition at line 112 of file ctcm_mpc.h.

#define QLLC_DISCONNECT   0x53

Definition at line 139 of file ctcm_mpc.h.

#define QLLC_EXCHID   0xBF

Definition at line 142 of file ctcm_mpc.h.

#define QLLC_REQ   0xFF

Definition at line 136 of file ctcm_mpc.h.

#define QLLC_RESP   0x00

Definition at line 137 of file ctcm_mpc.h.

#define QLLC_SETMODE   0x93

Definition at line 141 of file ctcm_mpc.h.

#define QLLC_UNSEQACK   0x73

Definition at line 140 of file ctcm_mpc.h.

#define TH_DATA_IS_XID   0x80

Definition at line 105 of file ctcm_mpc.h.

#define TH_DISCONTACT   0xc0

Definition at line 107 of file ctcm_mpc.h.

#define TH_HAS_PDU   0xf0

Definition at line 100 of file ctcm_mpc.h.

#define TH_HEADER_LENGTH   (sizeof(struct th_header))

Definition at line 109 of file ctcm_mpc.h.

#define TH_IS_XID   0x01

Definition at line 101 of file ctcm_mpc.h.

#define TH_LAST_SEG   0x10

Definition at line 109 of file ctcm_mpc.h.

#define TH_PDU_PART   0x08

Definition at line 110 of file ctcm_mpc.h.

#define TH_RETRY   0x40

Definition at line 106 of file ctcm_mpc.h.

#define TH_SEG_BLK   0x20

Definition at line 108 of file ctcm_mpc.h.

#define TH_SWEEP_LENGTH   (sizeof(struct th_sweep))

Definition at line 110 of file ctcm_mpc.h.

#define TH_SWEEP_REQ   0xfe

Definition at line 102 of file ctcm_mpc.h.

#define TH_SWEEP_RESP   0xff

Definition at line 103 of file ctcm_mpc.h.

#define XID2_0   0x00

Definition at line 47 of file ctcm_mpc.h.

#define XID2_7   0x07

Definition at line 48 of file ctcm_mpc.h.

#define XID2_LENGTH   (sizeof(struct xid2))

Definition at line 79 of file ctcm_mpc.h.

#define XID2_READ_SIDE   0x05

Definition at line 50 of file ctcm_mpc.h.

#define XID2_WRITE_SIDE   0x04

Definition at line 49 of file ctcm_mpc.h.

#define XID_FM2   0x20

Definition at line 46 of file ctcm_mpc.h.

#define XSIDE   1

Definition at line 146 of file ctcm_mpc.h.

#define YSIDE   0

Definition at line 147 of file ctcm_mpc.h.

Function Documentation

struct xid2 __attribute__ ( (packed)  )
read

Definition at line 171 of file esd_usb2.c.

int ctc_mpc_alloc_channel ( int  port,
void(*)(int port_num, int max_write_size)  callback 
)
void ctc_mpc_dealloc_ch ( int  port)

Definition at line 527 of file ctcm_mpc.c.

void ctc_mpc_establish_connectivity ( int  port,
void(*)(int port_num, int rc, int max_write_size)  callback 
)
void ctc_mpc_flow_control ( int  port,
int  flowc 
)

Definition at line 561 of file ctcm_mpc.c.

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 ctcmpc_bh ( unsigned long  thischan)

tasklet helper for mpc's skb unpacking.

ch The channel to work on. Allow flow control back pressure to occur here. Throttling back channel can result in excessive channel inactivity and system deact of channel

Definition at line 1247 of file ctcm_mpc.c.

int ctcmpc_open ( struct net_device )
void mpc_action_discontact ( fsm_instance fi,
int  event,
void arg 
)

Definition at line 1504 of file ctcm_mpc.c.

void mpc_action_send_discontact ( unsigned long  thischan)

Definition at line 1535 of file ctcm_mpc.c.

void mpc_channel_action ( struct channel ch,
int  direction,
int  action 
)

Definition at line 939 of file ctcm_mpc.c.

void mpc_group_ready ( unsigned long  adev)

Definition at line 883 of file ctcm_mpc.c.

Variable Documentation

__u8 pdu_flag

Definition at line 123 of file ctcm_mpc.h.

__u32 pdu_offset

Definition at line 122 of file ctcm_mpc.h.

__u8 pdu_proto

Definition at line 124 of file ctcm_mpc.h.

__u16 pdu_seq

Definition at line 125 of file ctcm_mpc.h.

__u8 qllc_address

Definition at line 135 of file ctcm_mpc.h.

__u8 qllc_commands

Definition at line 138 of file ctcm_mpc.h.

Definition at line 109 of file ctcm_mpc.h.

Definition at line 108 of file ctcm_mpc.h.

__u8 th_blk_flag

Definition at line 104 of file ctcm_mpc.h.

__u8 th_ch_flag

Definition at line 99 of file ctcm_mpc.h.

__u8 th_is_xid

Definition at line 111 of file ctcm_mpc.h.

__u32 th_last_seq

Definition at line 103 of file ctcm_mpc.h.

__u32 th_resvd

Definition at line 104 of file ctcm_mpc.h.

__u8 th_seg

Definition at line 98 of file ctcm_mpc.h.

__u32 th_seq_num

Definition at line 112 of file ctcm_mpc.h.

__u32 xid2_adj_id

Definition at line 80 of file ctcm_mpc.h.

__u16 xid2_buf_len

Definition at line 97 of file ctcm_mpc.h.

char xid2_buffer[255-(13 *sizeof(__u8)+2 *sizeof(__u32)+4 *sizeof(__u16)+8 *sizeof(char))]

Definition at line 101 of file ctcm_mpc.h.

__u8 xid2_dlc_type

Definition at line 93 of file ctcm_mpc.h.

__u8 xid2_flag1

Definition at line 83 of file ctcm_mpc.h.

__u8 xid2_flag2

Definition at line 89 of file ctcm_mpc.h.

__u8 xid2_flag4

Definition at line 85 of file ctcm_mpc.h.

__u8 xid2_fmtt

Definition at line 84 of file ctcm_mpc.h.

__u8 xid2_len

Definition at line 79 of file ctcm_mpc.h.

__u8 xid2_mpc_flag

Definition at line 95 of file ctcm_mpc.h.

__u8 xid2_option

Definition at line 90 of file ctcm_mpc.h.

__u8 xid2_resv1

Definition at line 82 of file ctcm_mpc.h.

__u16 xid2_resv2

Definition at line 86 of file ctcm_mpc.h.

char xid2_resv3[8]

Definition at line 91 of file ctcm_mpc.h.

__u16 xid2_resv4

Definition at line 92 of file ctcm_mpc.h.

__u16 xid2_resv5

Definition at line 94 of file ctcm_mpc.h.

__u8 xid2_resv6

Definition at line 96 of file ctcm_mpc.h.

__u8 xid2_rlen

Definition at line 81 of file ctcm_mpc.h.

__u32 xid2_sender_id

Definition at line 88 of file ctcm_mpc.h.

__u8 xid2_tgnum

Definition at line 87 of file ctcm_mpc.h.

__u8 xid2_type_id

Definition at line 78 of file ctcm_mpc.h.