1 /*****************************************************************************
5 * $Date: 2005/03/23 07:41:27 $ *
7 * part of the Chelsio 10Gb Ethernet Driver. *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License, version 2, as *
11 * published by the Free Software Foundation. *
13 * You should have received a copy of the GNU General Public License along *
14 * with this program; if not, write to the Free Software Foundation, Inc., *
15 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED *
18 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF *
19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. *
21 * http://www.chelsio.com *
23 * Copyright (c) 2003 - 2005 Chelsio Communications, Inc. *
24 * All rights reserved. *
26 * Maintainers: maintainers@chelsio.com *
28 * Authors: Dimitrios Michailidis <dm@chelsio.com> *
29 * Tina Yang <tainay@chelsio.com> *
30 * Felix Marti <felix@chelsio.com> *
31 * Scott Bardone <sbardone@chelsio.com> *
32 * Kurt Ottaway <kottaway@chelsio.com> *
33 * Frank DiMambro <frank@chelsio.com> *
37 ****************************************************************************/
39 #ifndef __CXGB_LINUX_H__
40 #define __CXGB_LINUX_H__
42 #include <linux/netdevice.h>
43 #include <linux/skbuff.h>
44 #include <linux/version.h>
45 #include <asm/semaphore.h>
46 #include <asm/bitops.h>
48 /* This belongs in if_ether.h */
49 #define ETH_P_CPL5 0xf
55 struct net_device *dev;
58 struct link_config link_config;
59 struct net_device_stats netstats;
74 enum { /* adapter flags */
78 TCP_CSUM_CAPABLE = 0x8,
79 UDP_CSUM_CAPABLE = 0x10,
80 VLAN_ACCEL_CAPABLE = 0x20,
81 RX_CSUM_ENABLED = 0x40,
87 unsigned long registered_device_map;
88 unsigned long open_device_map;
95 struct work_struct ext_intr_handler_task;
96 struct adapter_params params;
98 struct vlan_group *vlan_grp;
100 /* Terminator modules. */
110 struct port_info port[MAX_NPORTS];
111 struct work_struct stats_update_task;
112 struct timer_list stats_update_timer;
114 struct semaphore mib_mutex;
116 spinlock_t work_lock;
118 spinlock_t async_lock ____cacheline_aligned; /* guards async operations */