make oldconfig will rebuild these...
[linux-2.4.21-pre4.git] / drivers / message / fusion / mptlan.h
1 /* mptlan.h */
2
3 #ifndef LINUX_MPTLAN_H_INCLUDED
4 #define LINUX_MPTLAN_H_INCLUDED
5 /*****************************************************************************/
6
7 #if !defined(__GENKSYMS__)
8 #include <linux/module.h>
9 #endif
10
11 #include <linux/netdevice.h>
12 #include <linux/errno.h>
13 // #include <linux/etherdevice.h>
14 #include <linux/fcdevice.h>
15 // #include <linux/fddidevice.h>
16 #include <linux/skbuff.h>
17 #include <linux/if_arp.h>
18 #include <linux/init.h>
19 #include <linux/kernel.h>
20 #include <linux/slab.h>
21 #include <linux/miscdevice.h>
22 #include <linux/spinlock.h>
23 #include <linux/version.h>
24 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,41)
25 #include <linux/tqueue.h>
26 #else
27 #include <linux/workqueue.h>
28 #endif
29 #include <linux/delay.h>
30 // #include <linux/trdevice.h>
31
32 #include <asm/uaccess.h>
33 #include <asm/io.h>
34
35     /* Override mptbase.h by pre-defining these! */
36     #define MODULEAUTHOR "Noah Romer, Eddie C. Dost"
37
38 #include "mptbase.h"
39
40 /*****************************************************************************/
41 #define LANAME          "Fusion MPT LAN driver"
42 #define LANVER          MPT_LINUX_VERSION_COMMON
43
44 #ifdef MODULE
45 MODULE_AUTHOR(MODULEAUTHOR);
46 MODULE_DESCRIPTION(LANAME);
47 #endif
48 /*****************************************************************************/
49
50 #define MPT_LAN_MAX_BUCKETS_OUT 256
51 #define MPT_LAN_BUCKET_THRESH   18 /* 9 buckets in one message */
52 #define MPT_LAN_BUCKETS_REMAIN_MISMATCH_THRESH 10
53 #define MPT_LAN_RX_COPYBREAK    200
54 #define MPT_LAN_TX_TIMEOUT      (1*HZ)
55 #define MPT_TX_MAX_OUT_LIM      127
56
57 #define MPT_LAN_MIN_MTU         96              /* RFC2625 */
58 #define MPT_LAN_MAX_MTU         65280           /* RFC2625 */
59 #define MPT_LAN_MTU             13312           /* Max perf range + lower mem
60                                                    usage than 16128 */
61
62 #define MPT_LAN_NAA_RFC2625     0x1
63 #define MPT_LAN_NAA_QLOGIC      0x2
64
65 /* MPT LAN Reset and Suspend Resource Flags Defines */
66
67 #define MPT_LAN_RESOURCE_FLAG_RETURN_POSTED_BUCKETS    0x01
68 #define MPT_LAN_RESOURCE_FLAG_RETURN_PEND_TRANSMITS    0x02
69
70 /*****************************************************************************/
71 #ifdef MPT_LAN_IO_DEBUG
72 #define dioprintk(x)  printk x
73 #else
74 #define dioprintk(x)
75 #endif
76
77 #ifdef MPT_LAN_DEBUG
78 #define dlprintk(x)  printk x
79 #else
80 #define dlprintk(x)
81 #endif
82
83 #define NETDEV_TO_LANPRIV_PTR(d)        ((struct mpt_lan_priv *)(d)->priv)
84 #define NETDEV_PTR_TO_IOC_NAME_s(d)     (NETDEV_TO_LANPRIV_PTR(d)->mpt_dev->name)
85 #define IOC_AND_NETDEV_NAMES_s_s(d)     NETDEV_PTR_TO_IOC_NAME_s(d), (d)->name
86
87 /*****************************************************************************/
88 #endif
89