Go to the documentation of this file.
14 #include <linux/netdevice.h>
20 #define CTC_DRIVER_NAME "ctcm"
21 #define CTC_DEVICE_NAME "ctc"
22 #define MPC_DEVICE_NAME "mpc"
23 #define CTC_DEVICE_GENE CTC_DEVICE_NAME "%d"
24 #define MPC_DEVICE_GENE MPC_DEVICE_NAME "%d"
26 #define CHANNEL_FLAGS_READ 0
27 #define CHANNEL_FLAGS_WRITE 1
28 #define CHANNEL_FLAGS_INUSE 2
29 #define CHANNEL_FLAGS_BUFSIZE_CHANGED 4
30 #define CHANNEL_FLAGS_FAILED 8
31 #define CHANNEL_FLAGS_WAITIRQ 16
32 #define CHANNEL_FLAGS_RWMASK 1
33 #define CHANNEL_DIRECTION(f) (f & CHANNEL_FLAGS_RWMASK)
35 #define LOG_FLAG_ILLEGALPKT 1
36 #define LOG_FLAG_ILLEGALSIZE 2
37 #define LOG_FLAG_OVERRUN 4
38 #define LOG_FLAG_NOMEM 8
40 #define ctcm_pr_debug(fmt, arg...) printk(KERN_DEBUG fmt, ##arg)
42 #define CTCM_PR_DEBUG(fmt, arg...) \
45 printk(KERN_DEBUG fmt, ##arg); \
48 #define CTCM_PR_DBGDATA(fmt, arg...) \
51 printk(KERN_DEBUG fmt, ##arg); \
54 #define CTCM_D3_DUMP(buf, len) \
57 ctcmpc_dumpit(buf, len); \
60 #define CTCM_CCW_DUMP(buf, len) \
63 ctcmpc_dumpit(buf, len); \
86 #define CCW_CMD_WRITE 0x01
87 #define CCW_CMD_READ 0x02
88 #define CCW_CMD_NOOP 0x03
89 #define CCW_CMD_TIC 0x08
90 #define CCW_CMD_SENSE_CMD 0x14
91 #define CCW_CMD_WRITE_CTL 0x17
92 #define CCW_CMD_SET_EXTENDED 0xc3
93 #define CCW_CMD_PREPARE 0xe3
95 #define CTCM_PROTO_S390 0
96 #define CTCM_PROTO_LINUX 1
97 #define CTCM_PROTO_LINUX_TTY 2
98 #define CTCM_PROTO_OS390 3
99 #define CTCM_PROTO_MPC 4
100 #define CTCM_PROTO_MAX 4
102 #define CTCM_BUFSIZE_LIMIT 65535
103 #define CTCM_BUFSIZE_DEFAULT 32768
104 #define MPC_BUFSIZE_DEFAULT CTCM_BUFSIZE_LIMIT
106 #define CTCM_TIME_1_SEC 1000
107 #define CTCM_TIME_5_SEC 5000
108 #define CTCM_TIME_10_SEC 10000
110 #define CTCM_INITIAL_BLOCKLEN 2
115 #define CTCM_ID_SIZE 20+3
232 static inline void ctcm_clear_busy_do(
struct net_device *
dev)
235 netif_wake_queue(dev);
238 static inline void ctcm_clear_busy(
struct net_device *dev)
244 ctcm_clear_busy_do(dev);
248 static inline int ctcm_test_and_set_busy(
struct net_device *dev)
250 netif_stop_queue(dev);
264 static inline int ctcm_less_than(
char *
id1,
char *
id2)
266 unsigned long dev1, dev2;
274 return (dev1 < dev2);
279 static inline int ctcm_checkalloc_buffer(
struct channel *ch)
295 #define IS_MPC(p) ((p)->protocol == CTCM_PROTO_MPC)
298 #define IS_MPCDEV(dev) IS_MPC((struct ctcm_priv *)dev->ml_priv)
300 static inline gfp_t gfp_type(
void)
313 #define LL_HEADER_LENGTH (sizeof(struct ll_header))