author | Florian Pose <fp@igh.de> |
Wed, 06 Dec 2017 10:09:50 +0100 | |
branch | stable-1.5 |
changeset 2692 | cb240525acb6 |
parent 676 | aa394dc1943a |
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 |
#include "../ecdev.h" |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
76 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
77 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
78 |
#define BAR_0 0 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
79 |
#define BAR_1 1 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
80 |
#define BAR_5 5 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
81 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
82 |
#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
|
83 |
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
|
84 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
85 |
struct e1000_adapter; |
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 |
#include "e1000_hw-2.6.13-ethercat.h" |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
88 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
89 |
#ifdef DBG |
675
e36e070750e6
Added ec_e1000 prefix for DPRINTK() macros.
Florian Pose <fp@igh-essen.com>
parents:
673
diff
changeset
|
90 |
#define E1000_DBG(args...) printk(KERN_DEBUG "ec_e1000: " args) |
673
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
91 |
#else |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
92 |
#define E1000_DBG(args...) |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
93 |
#endif |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
94 |
|
675
e36e070750e6
Added ec_e1000 prefix for DPRINTK() macros.
Florian Pose <fp@igh-essen.com>
parents:
673
diff
changeset
|
95 |
#define E1000_ERR(args...) printk(KERN_ERR "ec_e1000: " args) |
e36e070750e6
Added ec_e1000 prefix for DPRINTK() macros.
Florian Pose <fp@igh-essen.com>
parents:
673
diff
changeset
|
96 |
|
e36e070750e6
Added ec_e1000 prefix for DPRINTK() macros.
Florian Pose <fp@igh-essen.com>
parents:
673
diff
changeset
|
97 |
#define PFX "ec_e1000: " |
673
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
98 |
#define DPRINTK(nlevel, klevel, fmt, args...) \ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
99 |
(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
|
100 |
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
|
101 |
__FUNCTION__ , ## args)) |
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 |
#define E1000_MAX_INTR 10 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
104 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
105 |
/* TX/RX descriptor defines */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
106 |
#define E1000_DEFAULT_TXD 256 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
107 |
#define E1000_MAX_TXD 256 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
108 |
#define E1000_MIN_TXD 80 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
109 |
#define E1000_MAX_82544_TXD 4096 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
110 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
111 |
#define E1000_DEFAULT_RXD 256 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
112 |
#define E1000_MAX_RXD 256 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
113 |
#define E1000_MIN_RXD 80 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
114 |
#define E1000_MAX_82544_RXD 4096 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
115 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
116 |
/* Supported Rx Buffer Sizes */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
117 |
#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
|
118 |
#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
|
119 |
#define E1000_RXBUFFER_2048 2048 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
120 |
#define E1000_RXBUFFER_4096 4096 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
121 |
#define E1000_RXBUFFER_8192 8192 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
122 |
#define E1000_RXBUFFER_16384 16384 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
123 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
124 |
/* SmartSpeed delimiters */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
125 |
#define E1000_SMARTSPEED_DOWNSHIFT 3 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
126 |
#define E1000_SMARTSPEED_MAX 15 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
127 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
128 |
/* Packet Buffer allocations */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
129 |
#define E1000_PBA_BYTES_SHIFT 0xA |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
130 |
#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
|
131 |
#define E1000_PBA_TX_MASK 0xFFFF0000 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
132 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
133 |
/* Flow Control Watermarks */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
134 |
#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
|
135 |
#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
|
136 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
137 |
#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
|
138 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
139 |
/* 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
|
140 |
#define E1000_TX_QUEUE_WAKE 16 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
141 |
/* 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
|
142 |
#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
|
143 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
144 |
#define AUTO_ALL_MODES 0 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
145 |
#define E1000_EEPROM_82544_APM 0x0004 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
146 |
#define E1000_EEPROM_APME 0x0400 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
147 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
148 |
#ifndef E1000_MASTER_SLAVE |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
149 |
/* 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
|
150 |
#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
|
151 |
#endif |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
152 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
153 |
#define E1000_MNG_VLAN_NONE -1 |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
154 |
/* 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
|
155 |
#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
|
156 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
157 |
/* 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
|
158 |
#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
|
159 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
160 |
/* 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
|
161 |
* 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
|
162 |
struct e1000_buffer { |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
163 |
struct sk_buff *skb; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
164 |
dma_addr_t dma; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
165 |
unsigned long time_stamp; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
166 |
uint16_t length; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
167 |
uint16_t next_to_watch; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
168 |
}; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
169 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
170 |
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
|
171 |
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
|
172 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
173 |
struct e1000_desc_ring { |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
174 |
/* pointer to the descriptor ring memory */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
175 |
void *desc; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
176 |
/* physical address of the descriptor ring */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
177 |
dma_addr_t dma; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
178 |
/* length of descriptor ring in bytes */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
179 |
unsigned int size; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
180 |
/* number of descriptors in the ring */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
181 |
unsigned int count; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
182 |
/* 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
|
183 |
unsigned int next_to_use; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
184 |
/* 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
|
185 |
unsigned int next_to_clean; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
186 |
/* array of buffer information structs */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
187 |
struct e1000_buffer *buffer_info; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
188 |
/* 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
|
189 |
struct e1000_ps_page *ps_page; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
190 |
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
|
191 |
}; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
192 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
193 |
#define E1000_DESC_UNUSED(R) \ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
194 |
((((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
|
195 |
(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
|
196 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
197 |
#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
|
198 |
(&(((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
|
199 |
#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
|
200 |
(&(((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
|
201 |
#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
|
202 |
#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
|
203 |
#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
|
204 |
#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
|
205 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
206 |
/* board specific private data structure */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
207 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
208 |
struct e1000_adapter { |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
209 |
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
|
210 |
struct timer_list watchdog_timer; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
211 |
struct timer_list phy_info_timer; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
212 |
struct vlan_group *vlgrp; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
213 |
uint16_t mng_vlan_id; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
214 |
uint32_t bd_number; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
215 |
uint32_t rx_buffer_len; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
216 |
uint32_t part_num; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
217 |
uint32_t wol; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
218 |
uint32_t smartspeed; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
219 |
uint32_t en_mng_pt; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
220 |
uint16_t link_speed; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
221 |
uint16_t link_duplex; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
222 |
spinlock_t stats_lock; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
223 |
atomic_t irq_sem; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
224 |
struct work_struct tx_timeout_task; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
225 |
struct work_struct watchdog_task; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
226 |
uint8_t fc_autoneg; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
227 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
228 |
struct timer_list blink_timer; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
229 |
unsigned long led_status; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
230 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
231 |
/* TX */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
232 |
struct e1000_desc_ring tx_ring; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
233 |
struct e1000_buffer previous_buffer_info; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
234 |
spinlock_t tx_lock; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
235 |
uint32_t txd_cmd; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
236 |
uint32_t tx_int_delay; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
237 |
uint32_t tx_abs_int_delay; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
238 |
uint32_t gotcl; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
239 |
uint64_t gotcl_old; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
240 |
uint64_t tpt_old; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
241 |
uint64_t colc_old; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
242 |
uint32_t tx_fifo_head; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
243 |
uint32_t tx_head_addr; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
244 |
uint32_t tx_fifo_size; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
245 |
atomic_t tx_fifo_stall; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
246 |
boolean_t pcix_82544; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
247 |
boolean_t detect_tx_hung; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
248 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
249 |
/* RX */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
250 |
#ifdef CONFIG_E1000_NAPI |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
251 |
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
|
252 |
int work_to_do); |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
253 |
#else |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
254 |
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
|
255 |
#endif |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
256 |
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
|
257 |
struct e1000_desc_ring rx_ring; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
258 |
uint64_t hw_csum_err; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
259 |
uint64_t hw_csum_good; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
260 |
uint32_t rx_int_delay; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
261 |
uint32_t rx_abs_int_delay; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
262 |
boolean_t rx_csum; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
263 |
boolean_t rx_ps; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
264 |
uint32_t gorcl; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
265 |
uint64_t gorcl_old; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
266 |
uint16_t rx_ps_bsize0; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
267 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
268 |
/* Interrupt Throttle Rate */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
269 |
uint32_t itr; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
270 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
271 |
/* OS defined structs */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
272 |
struct net_device *netdev; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
273 |
struct pci_dev *pdev; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
274 |
struct net_device_stats net_stats; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
275 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
276 |
/* structs defined in e1000_hw.h */ |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
277 |
struct e1000_hw hw; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
278 |
struct e1000_hw_stats stats; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
279 |
struct e1000_phy_info phy_info; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
280 |
struct e1000_phy_stats phy_stats; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
281 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
282 |
uint32_t test_icr; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
283 |
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
|
284 |
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
|
285 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
286 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
287 |
int msg_enable; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
288 |
#ifdef CONFIG_PCI_MSI |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
289 |
boolean_t have_msi; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
290 |
#endif |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
291 |
|
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
292 |
ec_device_t *ecdev; |
676
aa394dc1943a
First working version of e1000 driver under 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
675
diff
changeset
|
293 |
unsigned long ec_watchdog_jiffies; |
673
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
294 |
}; |
21c266c3f463
Added e1000 driver for kernel 2.6.13.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
295 |
#endif /* _E1000_H_ */ |