/*1* linux/drivers/message/fusion/mptlan.h2* IP Over Fibre Channel device driver.3* For use with LSI Fibre Channel PCI chip/adapters4* running LSI Fusion MPT (Message Passing Technology) firmware.5*6* Copyright (c) 2000-2008 LSI Corporation7* (mailto:[email protected])8*9*/10/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/11/*12This program is free software; you can redistribute it and/or modify13it under the terms of the GNU General Public License as published by14the Free Software Foundation; version 2 of the License.1516This program is distributed in the hope that it will be useful,17but WITHOUT ANY WARRANTY; without even the implied warranty of18MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the19GNU General Public License for more details.2021NO WARRANTY22THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR23CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT24LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,25MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is26solely responsible for determining the appropriateness of using and27distributing the Program and assumes all risks associated with its28exercise of rights under this Agreement, including but not limited to29the risks and costs of program errors, damage to or loss of data,30programs or equipment, and unavailability or interruption of operations.3132DISCLAIMER OF LIABILITY33NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY34DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL35DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND36ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR37TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE38USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED39HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES4041You should have received a copy of the GNU General Public License42along with this program; if not, write to the Free Software43Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA44*/45/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/4647/* mptlan.h */4849#ifndef LINUX_MPTLAN_H_INCLUDED50#define LINUX_MPTLAN_H_INCLUDED51/*****************************************************************************/5253#if !defined(__GENKSYMS__)54#include <linux/module.h>55#endif5657#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/workqueue.h>70#include <linux/delay.h>71// #include <linux/trdevice.h>7273#include <asm/uaccess.h>74#include <asm/io.h>7576/* Override mptbase.h by pre-defining these! */77#define MODULEAUTHOR "LSI Corporation"7879#include "mptbase.h"8081/*****************************************************************************/82#define LANAME "Fusion MPT LAN driver"83#define LANVER MPT_LINUX_VERSION_COMMON8485#ifdef MODULE86MODULE_AUTHOR(MODULEAUTHOR);87MODULE_DESCRIPTION(LANAME);88#endif89/*****************************************************************************/9091#define MPT_LAN_MAX_BUCKETS_OUT 25692#define MPT_LAN_BUCKET_THRESH 18 /* 9 buckets in one message */93#define MPT_LAN_BUCKETS_REMAIN_MISMATCH_THRESH 1094#define MPT_LAN_RX_COPYBREAK 20095#define MPT_LAN_TX_TIMEOUT (1*HZ)96#define MPT_TX_MAX_OUT_LIM 1279798#define MPT_LAN_MIN_MTU 96 /* RFC2625 */99#define MPT_LAN_MAX_MTU 65280 /* RFC2625 */100#define MPT_LAN_MTU 13312 /* Max perf range + lower mem101usage than 16128 */102103#define MPT_LAN_NAA_RFC2625 0x1104#define MPT_LAN_NAA_QLOGIC 0x2105106/* MPT LAN Reset and Suspend Resource Flags Defines */107108#define MPT_LAN_RESOURCE_FLAG_RETURN_POSTED_BUCKETS 0x01109#define MPT_LAN_RESOURCE_FLAG_RETURN_PEND_TRANSMITS 0x02110111/*****************************************************************************/112#ifdef MPT_LAN_IO_DEBUG113#define dioprintk(x) printk x114#else115#define dioprintk(x)116#endif117118#ifdef MPT_LAN_DEBUG119#define dlprintk(x) printk x120#else121#define dlprintk(x)122#endif123124#define NETDEV_TO_LANPRIV_PTR(d) ((struct mpt_lan_priv *)netdev_priv(d))125#define NETDEV_PTR_TO_IOC_NAME_s(d) (NETDEV_TO_LANPRIV_PTR(d)->mpt_dev->name)126#define IOC_AND_NETDEV_NAMES_s_s(d) NETDEV_PTR_TO_IOC_NAME_s(d), (d)->name127128/*****************************************************************************/129#endif130131132133