[SCSI] mptfusion: mptlan Remove credits and update copyright
[linux-2.6/btrfs-unstable.git] / drivers / message / fusion / mptlan.h
blob750e343eb98143bbdd76687dea3d070c705ac8a1
1 /*
2 * linux/drivers/message/fusion/mptlan.h
3 * IP Over Fibre Channel device driver.
4 * For use with LSI Logic Fibre Channel PCI chip/adapters
5 * running LSI Logic Fusion MPT (Message Passing Technology) firmware.
7 * Copyright (c) 2000-2005 LSI Logic Corporation
9 */
10 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
12 This program is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation; version 2 of the License.
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
21 NO WARRANTY
22 THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR
23 CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT
24 LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
25 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is
26 solely responsible for determining the appropriateness of using and
27 distributing the Program and assumes all risks associated with its
28 exercise of rights under this Agreement, including but not limited to
29 the risks and costs of program errors, damage to or loss of data,
30 programs or equipment, and unavailability or interruption of operations.
32 DISCLAIMER OF LIABILITY
33 NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY
34 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
35 DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND
36 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
37 TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
38 USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
39 HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES
41 You should have received a copy of the GNU General Public License
42 along with this program; if not, write to the Free Software
43 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
45 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
47 /* mptlan.h */
49 #ifndef LINUX_MPTLAN_H_INCLUDED
50 #define LINUX_MPTLAN_H_INCLUDED
51 /*****************************************************************************/
53 #if !defined(__GENKSYMS__)
54 #include <linux/module.h>
55 #endif
57 #include <linux/netdevice.h>
58 #include <linux/errno.h>
59 // #include <linux/etherdevice.h>
60 #include <linux/fcdevice.h>
61 // #include <linux/fddidevice.h>
62 #include <linux/skbuff.h>
63 #include <linux/if_arp.h>
64 #include <linux/init.h>
65 #include <linux/kernel.h>
66 #include <linux/slab.h>
67 #include <linux/miscdevice.h>
68 #include <linux/spinlock.h>
69 #include <linux/version.h>
70 #include <linux/workqueue.h>
71 #include <linux/delay.h>
72 // #include <linux/trdevice.h>
74 #include <asm/uaccess.h>
75 #include <asm/io.h>
77 /* Override mptbase.h by pre-defining these! */
78 #define MODULEAUTHOR "LSI Logic Corporation"
80 #include "mptbase.h"
82 /*****************************************************************************/
83 #define LANAME "Fusion MPT LAN driver"
84 #define LANVER MPT_LINUX_VERSION_COMMON
86 #ifdef MODULE
87 MODULE_AUTHOR(MODULEAUTHOR);
88 MODULE_DESCRIPTION(LANAME);
89 #endif
90 /*****************************************************************************/
92 #define MPT_LAN_MAX_BUCKETS_OUT 256
93 #define MPT_LAN_BUCKET_THRESH 18 /* 9 buckets in one message */
94 #define MPT_LAN_BUCKETS_REMAIN_MISMATCH_THRESH 10
95 #define MPT_LAN_RX_COPYBREAK 200
96 #define MPT_LAN_TX_TIMEOUT (1*HZ)
97 #define MPT_TX_MAX_OUT_LIM 127
99 #define MPT_LAN_MIN_MTU 96 /* RFC2625 */
100 #define MPT_LAN_MAX_MTU 65280 /* RFC2625 */
101 #define MPT_LAN_MTU 13312 /* Max perf range + lower mem
102 usage than 16128 */
104 #define MPT_LAN_NAA_RFC2625 0x1
105 #define MPT_LAN_NAA_QLOGIC 0x2
107 /* MPT LAN Reset and Suspend Resource Flags Defines */
109 #define MPT_LAN_RESOURCE_FLAG_RETURN_POSTED_BUCKETS 0x01
110 #define MPT_LAN_RESOURCE_FLAG_RETURN_PEND_TRANSMITS 0x02
112 /*****************************************************************************/
113 #ifdef MPT_LAN_IO_DEBUG
114 #define dioprintk(x) printk x
115 #else
116 #define dioprintk(x)
117 #endif
119 #ifdef MPT_LAN_DEBUG
120 #define dlprintk(x) printk x
121 #else
122 #define dlprintk(x)
123 #endif
125 #define NETDEV_TO_LANPRIV_PTR(d) ((struct mpt_lan_priv *)(d)->priv)
126 #define NETDEV_PTR_TO_IOC_NAME_s(d) (NETDEV_TO_LANPRIV_PTR(d)->mpt_dev->name)
127 #define IOC_AND_NETDEV_NAMES_s_s(d) NETDEV_PTR_TO_IOC_NAME_s(d), (d)->name
129 /*****************************************************************************/
130 #endif