author | Florian Pose <fp@igh-essen.com> |
Mon, 23 Jul 2012 15:35:32 +0200 | |
branch | stable-1.5 |
changeset 2401 | 7f7580b318c3 |
parent 673 | 21c266c3f463 |
permissions | -rw-r--r-- |
673
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
1 |
/******************************************************************************* |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
2 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
3 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
4 |
Copyright(c) 1999 - 2005 Intel Corporation. All rights reserved. |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
5 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
6 |
This program is free software; you can redistribute it and/or modify it |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
7 |
under the terms of the GNU General Public License as published by the Free |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
8 |
Software Foundation; either version 2 of the License, or (at your option) |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
9 |
any later version. |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
10 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
11 |
This program is distributed in the hope that it will be useful, but WITHOUT |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
12 |
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
13 |
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
14 |
more details. |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
15 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
16 |
You should have received a copy of the GNU General Public License along with |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
17 |
this program; if not, write to the Free Software Foundation, Inc., 59 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
18 |
Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
19 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
20 |
The full GNU General Public License is included in this distribution in the |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
21 |
file called LICENSE. |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
22 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
23 |
Contact Information: |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
24 |
Linux NICS <linux.nics@intel.com> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
25 |
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
26 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
27 |
*******************************************************************************/ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
28 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
29 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
30 |
/* Linux PRO/1000 Ethernet Driver main header file */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
31 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
32 |
#ifndef _E1000_H_ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
33 |
#define _E1000_H_ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
34 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
35 |
#include <linux/stddef.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
36 |
#include <linux/config.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
37 |
#include <linux/module.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
38 |
#include <linux/types.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
39 |
#include <asm/byteorder.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
40 |
#include <linux/init.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
41 |
#include <linux/mm.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
42 |
#include <linux/errno.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
43 |
#include <linux/ioport.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
44 |
#include <linux/pci.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
45 |
#include <linux/kernel.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
46 |
#include <linux/netdevice.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
47 |
#include <linux/etherdevice.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
48 |
#include <linux/skbuff.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
49 |
#include <linux/delay.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
50 |
#include <linux/timer.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
51 |
#include <linux/slab.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
52 |
#include <linux/vmalloc.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
53 |
#include <linux/interrupt.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
54 |
#include <linux/string.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
55 |
#include <linux/pagemap.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
56 |
#include <linux/dma-mapping.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
57 |
#include <linux/bitops.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
58 |
#include <asm/io.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
59 |
#include <asm/irq.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
60 |
#include <linux/capability.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
61 |
#include <linux/in.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
62 |
#include <linux/ip.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
63 |
#include <linux/tcp.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
64 |
#include <linux/udp.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
65 |
#include <net/pkt_sched.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
66 |
#include <linux/list.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
67 |
#include <linux/reboot.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
68 |
#ifdef NETIF_F_TSO |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
69 |
#include <net/checksum.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
70 |
#endif |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
71 |
#include <linux/workqueue.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
72 |
#include <linux/mii.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
73 |
#include <linux/ethtool.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
74 |
#include <linux/if_vlan.h> |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
75 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
76 |
#define BAR_0 0 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
77 |
#define BAR_1 1 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
78 |
#define BAR_5 5 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
79 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
80 |
#define INTEL_E1000_ETHERNET_DEVICE(device_id) {\ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
81 |
PCI_DEVICE(PCI_VENDOR_ID_INTEL, device_id)} |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
82 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
83 |
struct e1000_adapter; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
84 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
85 |
#include "e1000_hw.h" |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
86 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
87 |
#ifdef DBG |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
88 |
#define E1000_DBG(args...) printk(KERN_DEBUG "e1000: " args) |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
89 |
#else |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
90 |
#define E1000_DBG(args...) |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
91 |
#endif |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
92 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
93 |
#define E1000_ERR(args...) printk(KERN_ERR "e1000: " args) |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
94 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
95 |
#define PFX "e1000: " |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
96 |
#define DPRINTK(nlevel, klevel, fmt, args...) \ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
97 |
(void)((NETIF_MSG_##nlevel & adapter->msg_enable) && \ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
98 |
printk(KERN_##klevel PFX "%s: %s: " fmt, adapter->netdev->name, \ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
99 |
__FUNCTION__ , ## args)) |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
100 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
101 |
#define E1000_MAX_INTR 10 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
102 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
103 |
/* TX/RX descriptor defines */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
104 |
#define E1000_DEFAULT_TXD 256 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
105 |
#define E1000_MAX_TXD 256 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
106 |
#define E1000_MIN_TXD 80 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
107 |
#define E1000_MAX_82544_TXD 4096 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
108 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
109 |
#define E1000_DEFAULT_RXD 256 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
110 |
#define E1000_MAX_RXD 256 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
111 |
#define E1000_MIN_RXD 80 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
112 |
#define E1000_MAX_82544_RXD 4096 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
113 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
114 |
/* Supported Rx Buffer Sizes */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
115 |
#define E1000_RXBUFFER_128 128 /* Used for packet split */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
116 |
#define E1000_RXBUFFER_256 256 /* Used for packet split */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
117 |
#define E1000_RXBUFFER_2048 2048 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
118 |
#define E1000_RXBUFFER_4096 4096 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
119 |
#define E1000_RXBUFFER_8192 8192 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
120 |
#define E1000_RXBUFFER_16384 16384 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
121 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
122 |
/* SmartSpeed delimiters */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
123 |
#define E1000_SMARTSPEED_DOWNSHIFT 3 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
124 |
#define E1000_SMARTSPEED_MAX 15 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
125 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
126 |
/* Packet Buffer allocations */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
127 |
#define E1000_PBA_BYTES_SHIFT 0xA |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
128 |
#define E1000_TX_HEAD_ADDR_SHIFT 7 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
129 |
#define E1000_PBA_TX_MASK 0xFFFF0000 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
130 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
131 |
/* Flow Control Watermarks */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
132 |
#define E1000_FC_HIGH_DIFF 0x1638 /* High: 5688 bytes below Rx FIFO size */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
133 |
#define E1000_FC_LOW_DIFF 0x1640 /* Low: 5696 bytes below Rx FIFO size */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
134 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
135 |
#define E1000_FC_PAUSE_TIME 0x0680 /* 858 usec */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
136 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
137 |
/* How many Tx Descriptors do we need to call netif_wake_queue ? */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
138 |
#define E1000_TX_QUEUE_WAKE 16 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
139 |
/* How many Rx Buffers do we bundle into one write to the hardware ? */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
140 |
#define E1000_RX_BUFFER_WRITE 16 /* Must be power of 2 */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
141 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
142 |
#define AUTO_ALL_MODES 0 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
143 |
#define E1000_EEPROM_82544_APM 0x0004 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
144 |
#define E1000_EEPROM_APME 0x0400 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
145 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
146 |
#ifndef E1000_MASTER_SLAVE |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
147 |
/* Switch to override PHY master/slave setting */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
148 |
#define E1000_MASTER_SLAVE e1000_ms_hw_default |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
149 |
#endif |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
150 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
151 |
#define E1000_MNG_VLAN_NONE -1 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
152 |
/* Number of packet split data buffers (not including the header buffer) */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
153 |
#define PS_PAGE_BUFFERS MAX_PS_BUFFERS-1 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
154 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
155 |
/* only works for sizes that are powers of 2 */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
156 |
#define E1000_ROUNDUP(i, size) ((i) = (((i) + (size) - 1) & ~((size) - 1))) |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
157 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
158 |
/* wrapper around a pointer to a socket buffer, |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
159 |
* so a DMA handle can be stored along with the buffer */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
160 |
struct e1000_buffer { |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
161 |
struct sk_buff *skb; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
162 |
dma_addr_t dma; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
163 |
unsigned long time_stamp; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
164 |
uint16_t length; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
165 |
uint16_t next_to_watch; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
166 |
}; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
167 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
168 |
struct e1000_ps_page { struct page *ps_page[MAX_PS_BUFFERS]; }; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
169 |
struct e1000_ps_page_dma { uint64_t ps_page_dma[MAX_PS_BUFFERS]; }; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
170 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
171 |
struct e1000_desc_ring { |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
172 |
/* pointer to the descriptor ring memory */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
173 |
void *desc; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
174 |
/* physical address of the descriptor ring */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
175 |
dma_addr_t dma; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
176 |
/* length of descriptor ring in bytes */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
177 |
unsigned int size; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
178 |
/* number of descriptors in the ring */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
179 |
unsigned int count; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
180 |
/* next descriptor to associate a buffer with */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
181 |
unsigned int next_to_use; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
182 |
/* next descriptor to check for DD status bit */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
183 |
unsigned int next_to_clean; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
184 |
/* array of buffer information structs */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
185 |
struct e1000_buffer *buffer_info; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
186 |
/* arrays of page information for packet split */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
187 |
struct e1000_ps_page *ps_page; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
188 |
struct e1000_ps_page_dma *ps_page_dma; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
189 |
}; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
190 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
191 |
#define E1000_DESC_UNUSED(R) \ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
192 |
((((R)->next_to_clean > (R)->next_to_use) ? 0 : (R)->count) + \ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
193 |
(R)->next_to_clean - (R)->next_to_use - 1) |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
194 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
195 |
#define E1000_RX_DESC_PS(R, i) \ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
196 |
(&(((union e1000_rx_desc_packet_split *)((R).desc))[i])) |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
197 |
#define E1000_RX_DESC_EXT(R, i) \ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
198 |
(&(((union e1000_rx_desc_extended *)((R).desc))[i])) |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
199 |
#define E1000_GET_DESC(R, i, type) (&(((struct type *)((R).desc))[i])) |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
200 |
#define E1000_RX_DESC(R, i) E1000_GET_DESC(R, i, e1000_rx_desc) |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
201 |
#define E1000_TX_DESC(R, i) E1000_GET_DESC(R, i, e1000_tx_desc) |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
202 |
#define E1000_CONTEXT_DESC(R, i) E1000_GET_DESC(R, i, e1000_context_desc) |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
203 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
204 |
/* board specific private data structure */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
205 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
206 |
struct e1000_adapter { |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
207 |
struct timer_list tx_fifo_stall_timer; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
208 |
struct timer_list watchdog_timer; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
209 |
struct timer_list phy_info_timer; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
210 |
struct vlan_group *vlgrp; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
211 |
uint16_t mng_vlan_id; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
212 |
uint32_t bd_number; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
213 |
uint32_t rx_buffer_len; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
214 |
uint32_t part_num; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
215 |
uint32_t wol; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
216 |
uint32_t smartspeed; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
217 |
uint32_t en_mng_pt; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
218 |
uint16_t link_speed; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
219 |
uint16_t link_duplex; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
220 |
spinlock_t stats_lock; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
221 |
atomic_t irq_sem; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
222 |
struct work_struct tx_timeout_task; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
223 |
struct work_struct watchdog_task; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
224 |
uint8_t fc_autoneg; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
225 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
226 |
struct timer_list blink_timer; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
227 |
unsigned long led_status; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
228 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
229 |
/* TX */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
230 |
struct e1000_desc_ring tx_ring; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
231 |
struct e1000_buffer previous_buffer_info; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
232 |
spinlock_t tx_lock; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
233 |
uint32_t txd_cmd; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
234 |
uint32_t tx_int_delay; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
235 |
uint32_t tx_abs_int_delay; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
236 |
uint32_t gotcl; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
237 |
uint64_t gotcl_old; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
238 |
uint64_t tpt_old; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
239 |
uint64_t colc_old; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
240 |
uint32_t tx_fifo_head; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
241 |
uint32_t tx_head_addr; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
242 |
uint32_t tx_fifo_size; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
243 |
atomic_t tx_fifo_stall; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
244 |
boolean_t pcix_82544; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
245 |
boolean_t detect_tx_hung; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
246 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
247 |
/* RX */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
248 |
#ifdef CONFIG_E1000_NAPI |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
249 |
boolean_t (*clean_rx) (struct e1000_adapter *adapter, int *work_done, |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
250 |
int work_to_do); |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
251 |
#else |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
252 |
boolean_t (*clean_rx) (struct e1000_adapter *adapter); |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
253 |
#endif |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
254 |
void (*alloc_rx_buf) (struct e1000_adapter *adapter); |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
255 |
struct e1000_desc_ring rx_ring; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
256 |
uint64_t hw_csum_err; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
257 |
uint64_t hw_csum_good; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
258 |
uint32_t rx_int_delay; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
259 |
uint32_t rx_abs_int_delay; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
260 |
boolean_t rx_csum; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
261 |
boolean_t rx_ps; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
262 |
uint32_t gorcl; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
263 |
uint64_t gorcl_old; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
264 |
uint16_t rx_ps_bsize0; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
265 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
266 |
/* Interrupt Throttle Rate */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
267 |
uint32_t itr; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
268 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
269 |
/* OS defined structs */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
270 |
struct net_device *netdev; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
271 |
struct pci_dev *pdev; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
272 |
struct net_device_stats net_stats; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
273 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
274 |
/* structs defined in e1000_hw.h */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
275 |
struct e1000_hw hw; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
276 |
struct e1000_hw_stats stats; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
277 |
struct e1000_phy_info phy_info; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
278 |
struct e1000_phy_stats phy_stats; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
279 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
280 |
uint32_t test_icr; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
281 |
struct e1000_desc_ring test_tx_ring; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
282 |
struct e1000_desc_ring test_rx_ring; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
283 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
284 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
285 |
int msg_enable; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
286 |
#ifdef CONFIG_PCI_MSI |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
287 |
boolean_t have_msi; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
288 |
#endif |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
289 |
}; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
290 |
#endif /* _E1000_H_ */ |