author | Florian Pose <fp@igh-essen.com> |
Tue, 10 Jan 2012 10:43:56 +0100 | |
branch | redundancy |
changeset 2342 | 4033d0d394ec |
parent 2136 | 729df853b3fb |
permissions | -rw-r--r-- |
2136
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
1 |
/******************************************************************************* |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
2 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
3 |
Intel PRO/1000 Linux driver |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
4 |
Copyright(c) 1999 - 2008 Intel Corporation. |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
5 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
6 |
This program is free software; you can redistribute it and/or modify it |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
7 |
under the terms and conditions of the GNU General Public License, |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
8 |
version 2, as published by the Free Software Foundation. |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
9 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
10 |
This program is distributed in the hope it will be useful, but WITHOUT |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
11 |
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
12 |
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
13 |
more details. |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
14 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
15 |
You should have received a copy of the GNU General Public License along with |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
16 |
this program; if not, write to the Free Software Foundation, Inc., |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
17 |
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
18 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
19 |
The full GNU General Public License is included in this distribution in |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
20 |
the file called "COPYING". |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
21 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
22 |
Contact Information: |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
23 |
Linux NICS <linux.nics@intel.com> |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
24 |
e1000-devel Mailing List <e1000-devel@lists.sourceforge.net> |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
25 |
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
26 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
27 |
*******************************************************************************/ |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
28 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
29 |
#include <linux/netdevice.h> |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
30 |
#include <linux/pci.h> |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
31 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
32 |
#include "e1000.h" |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
33 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
34 |
/* |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
35 |
* This is the only thing that needs to be changed to adjust the |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
36 |
* maximum number of ports that the driver can manage. |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
37 |
*/ |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
38 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
39 |
#define E1000_MAX_NIC 32 |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
40 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
41 |
#define OPTION_UNSET -1 |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
42 |
#define OPTION_DISABLED 0 |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
43 |
#define OPTION_ENABLED 1 |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
44 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
45 |
#define COPYBREAK_DEFAULT 256 |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
46 |
unsigned int copybreak = COPYBREAK_DEFAULT; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
47 |
module_param(copybreak, uint, 0644); |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
48 |
MODULE_PARM_DESC(copybreak, |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
49 |
"Maximum size of packet that is copied to a new buffer on receive"); |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
50 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
51 |
/* |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
52 |
* All parameters are treated the same, as an integer array of values. |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
53 |
* This macro just reduces the need to repeat the same declaration code |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
54 |
* over and over (plus this helps to avoid typo bugs). |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
55 |
*/ |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
56 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
57 |
#define E1000_PARAM_INIT { [0 ... E1000_MAX_NIC] = OPTION_UNSET } |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
58 |
#define E1000_PARAM(X, desc) \ |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
59 |
static int __devinitdata X[E1000_MAX_NIC+1] \ |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
60 |
= E1000_PARAM_INIT; \ |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
61 |
static unsigned int num_##X; \ |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
62 |
module_param_array_named(X, X, int, &num_##X, 0); \ |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
63 |
MODULE_PARM_DESC(X, desc); |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
64 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
65 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
66 |
/* |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
67 |
* Transmit Interrupt Delay in units of 1.024 microseconds |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
68 |
* Tx interrupt delay needs to typically be set to something non zero |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
69 |
* |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
70 |
* Valid Range: 0-65535 |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
71 |
*/ |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
72 |
E1000_PARAM(TxIntDelay, "Transmit Interrupt Delay"); |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
73 |
#define DEFAULT_TIDV 8 |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
74 |
#define MAX_TXDELAY 0xFFFF |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
75 |
#define MIN_TXDELAY 0 |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
76 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
77 |
/* |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
78 |
* Transmit Absolute Interrupt Delay in units of 1.024 microseconds |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
79 |
* |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
80 |
* Valid Range: 0-65535 |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
81 |
*/ |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
82 |
E1000_PARAM(TxAbsIntDelay, "Transmit Absolute Interrupt Delay"); |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
83 |
#define DEFAULT_TADV 32 |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
84 |
#define MAX_TXABSDELAY 0xFFFF |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
85 |
#define MIN_TXABSDELAY 0 |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
86 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
87 |
/* |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
88 |
* Receive Interrupt Delay in units of 1.024 microseconds |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
89 |
* hardware will likely hang if you set this to anything but zero. |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
90 |
* |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
91 |
* Valid Range: 0-65535 |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
92 |
*/ |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
93 |
E1000_PARAM(RxIntDelay, "Receive Interrupt Delay"); |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
94 |
#define DEFAULT_RDTR 0 |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
95 |
#define MAX_RXDELAY 0xFFFF |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
96 |
#define MIN_RXDELAY 0 |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
97 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
98 |
/* |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
99 |
* Receive Absolute Interrupt Delay in units of 1.024 microseconds |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
100 |
* |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
101 |
* Valid Range: 0-65535 |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
102 |
*/ |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
103 |
E1000_PARAM(RxAbsIntDelay, "Receive Absolute Interrupt Delay"); |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
104 |
#define DEFAULT_RADV 8 |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
105 |
#define MAX_RXABSDELAY 0xFFFF |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
106 |
#define MIN_RXABSDELAY 0 |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
107 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
108 |
/* |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
109 |
* Interrupt Throttle Rate (interrupts/sec) |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
110 |
* |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
111 |
* Valid Range: 100-100000 (0=off, 1=dynamic, 3=dynamic conservative) |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
112 |
*/ |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
113 |
E1000_PARAM(InterruptThrottleRate, "Interrupt Throttling Rate"); |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
114 |
#define DEFAULT_ITR 3 |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
115 |
#define MAX_ITR 100000 |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
116 |
#define MIN_ITR 100 |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
117 |
/* IntMode (Interrupt Mode) |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
118 |
* |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
119 |
* Valid Range: 0 - 2 |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
120 |
* |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
121 |
* Default Value: 2 (MSI-X) |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
122 |
*/ |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
123 |
E1000_PARAM(IntMode, "Interrupt Mode"); |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
124 |
#define MAX_INTMODE 2 |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
125 |
#define MIN_INTMODE 0 |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
126 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
127 |
/* |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
128 |
* Enable Smart Power Down of the PHY |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
129 |
* |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
130 |
* Valid Range: 0, 1 |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
131 |
* |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
132 |
* Default Value: 0 (disabled) |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
133 |
*/ |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
134 |
E1000_PARAM(SmartPowerDownEnable, "Enable PHY smart power down"); |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
135 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
136 |
/* |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
137 |
* Enable Kumeran Lock Loss workaround |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
138 |
* |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
139 |
* Valid Range: 0, 1 |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
140 |
* |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
141 |
* Default Value: 1 (enabled) |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
142 |
*/ |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
143 |
E1000_PARAM(KumeranLockLoss, "Enable Kumeran lock loss workaround"); |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
144 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
145 |
/* |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
146 |
* Write Protect NVM |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
147 |
* |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
148 |
* Valid Range: 0, 1 |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
149 |
* |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
150 |
* Default Value: 1 (enabled) |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
151 |
*/ |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
152 |
E1000_PARAM(WriteProtectNVM, "Write-protect NVM [WARNING: disabling this can lead to corrupted NVM]"); |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
153 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
154 |
/* |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
155 |
* Enable CRC Stripping |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
156 |
* |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
157 |
* Valid Range: 0, 1 |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
158 |
* |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
159 |
* Default Value: 1 (enabled) |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
160 |
*/ |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
161 |
E1000_PARAM(CrcStripping, "Enable CRC Stripping, disable if your BMC needs " \ |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
162 |
"the CRC"); |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
163 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
164 |
struct e1000_option { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
165 |
enum { enable_option, range_option, list_option } type; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
166 |
const char *name; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
167 |
const char *err; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
168 |
int def; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
169 |
union { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
170 |
struct { /* range_option info */ |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
171 |
int min; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
172 |
int max; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
173 |
} r; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
174 |
struct { /* list_option info */ |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
175 |
int nr; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
176 |
struct e1000_opt_list { int i; char *str; } *p; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
177 |
} l; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
178 |
} arg; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
179 |
}; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
180 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
181 |
static int __devinit e1000_validate_option(unsigned int *value, |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
182 |
const struct e1000_option *opt, |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
183 |
struct e1000_adapter *adapter) |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
184 |
{ |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
185 |
if (*value == OPTION_UNSET) { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
186 |
*value = opt->def; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
187 |
return 0; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
188 |
} |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
189 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
190 |
switch (opt->type) { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
191 |
case enable_option: |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
192 |
switch (*value) { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
193 |
case OPTION_ENABLED: |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
194 |
e_info("%s Enabled\n", opt->name); |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
195 |
return 0; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
196 |
case OPTION_DISABLED: |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
197 |
e_info("%s Disabled\n", opt->name); |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
198 |
return 0; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
199 |
} |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
200 |
break; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
201 |
case range_option: |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
202 |
if (*value >= opt->arg.r.min && *value <= opt->arg.r.max) { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
203 |
e_info("%s set to %i\n", opt->name, *value); |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
204 |
return 0; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
205 |
} |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
206 |
break; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
207 |
case list_option: { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
208 |
int i; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
209 |
struct e1000_opt_list *ent; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
210 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
211 |
for (i = 0; i < opt->arg.l.nr; i++) { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
212 |
ent = &opt->arg.l.p[i]; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
213 |
if (*value == ent->i) { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
214 |
if (ent->str[0] != '\0') |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
215 |
e_info("%s\n", ent->str); |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
216 |
return 0; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
217 |
} |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
218 |
} |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
219 |
} |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
220 |
break; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
221 |
default: |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
222 |
BUG(); |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
223 |
} |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
224 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
225 |
e_info("Invalid %s value specified (%i) %s\n", opt->name, *value, |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
226 |
opt->err); |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
227 |
*value = opt->def; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
228 |
return -1; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
229 |
} |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
230 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
231 |
/** |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
232 |
* e1000e_check_options - Range Checking for Command Line Parameters |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
233 |
* @adapter: board private structure |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
234 |
* |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
235 |
* This routine checks all command line parameters for valid user |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
236 |
* input. If an invalid value is given, or if no user specified |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
237 |
* value exists, a default value is used. The final value is stored |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
238 |
* in a variable in the adapter structure. |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
239 |
**/ |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
240 |
void __devinit e1000e_check_options(struct e1000_adapter *adapter) |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
241 |
{ |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
242 |
struct e1000_hw *hw = &adapter->hw; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
243 |
int bd = adapter->bd_number; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
244 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
245 |
if (bd >= E1000_MAX_NIC) { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
246 |
e_notice("Warning: no configuration for board #%i\n", bd); |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
247 |
e_notice("Using defaults for all values\n"); |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
248 |
} |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
249 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
250 |
{ /* Transmit Interrupt Delay */ |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
251 |
const struct e1000_option opt = { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
252 |
.type = range_option, |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
253 |
.name = "Transmit Interrupt Delay", |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
254 |
.err = "using default of " |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
255 |
__MODULE_STRING(DEFAULT_TIDV), |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
256 |
.def = DEFAULT_TIDV, |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
257 |
.arg = { .r = { .min = MIN_TXDELAY, |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
258 |
.max = MAX_TXDELAY } } |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
259 |
}; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
260 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
261 |
if (num_TxIntDelay > bd) { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
262 |
adapter->tx_int_delay = TxIntDelay[bd]; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
263 |
e1000_validate_option(&adapter->tx_int_delay, &opt, |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
264 |
adapter); |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
265 |
} else { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
266 |
adapter->tx_int_delay = opt.def; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
267 |
} |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
268 |
} |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
269 |
{ /* Transmit Absolute Interrupt Delay */ |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
270 |
const struct e1000_option opt = { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
271 |
.type = range_option, |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
272 |
.name = "Transmit Absolute Interrupt Delay", |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
273 |
.err = "using default of " |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
274 |
__MODULE_STRING(DEFAULT_TADV), |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
275 |
.def = DEFAULT_TADV, |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
276 |
.arg = { .r = { .min = MIN_TXABSDELAY, |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
277 |
.max = MAX_TXABSDELAY } } |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
278 |
}; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
279 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
280 |
if (num_TxAbsIntDelay > bd) { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
281 |
adapter->tx_abs_int_delay = TxAbsIntDelay[bd]; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
282 |
e1000_validate_option(&adapter->tx_abs_int_delay, &opt, |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
283 |
adapter); |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
284 |
} else { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
285 |
adapter->tx_abs_int_delay = opt.def; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
286 |
} |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
287 |
} |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
288 |
{ /* Receive Interrupt Delay */ |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
289 |
struct e1000_option opt = { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
290 |
.type = range_option, |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
291 |
.name = "Receive Interrupt Delay", |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
292 |
.err = "using default of " |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
293 |
__MODULE_STRING(DEFAULT_RDTR), |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
294 |
.def = DEFAULT_RDTR, |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
295 |
.arg = { .r = { .min = MIN_RXDELAY, |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
296 |
.max = MAX_RXDELAY } } |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
297 |
}; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
298 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
299 |
if (num_RxIntDelay > bd) { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
300 |
adapter->rx_int_delay = RxIntDelay[bd]; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
301 |
e1000_validate_option(&adapter->rx_int_delay, &opt, |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
302 |
adapter); |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
303 |
} else { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
304 |
adapter->rx_int_delay = opt.def; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
305 |
} |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
306 |
} |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
307 |
{ /* Receive Absolute Interrupt Delay */ |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
308 |
const struct e1000_option opt = { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
309 |
.type = range_option, |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
310 |
.name = "Receive Absolute Interrupt Delay", |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
311 |
.err = "using default of " |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
312 |
__MODULE_STRING(DEFAULT_RADV), |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
313 |
.def = DEFAULT_RADV, |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
314 |
.arg = { .r = { .min = MIN_RXABSDELAY, |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
315 |
.max = MAX_RXABSDELAY } } |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
316 |
}; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
317 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
318 |
if (num_RxAbsIntDelay > bd) { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
319 |
adapter->rx_abs_int_delay = RxAbsIntDelay[bd]; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
320 |
e1000_validate_option(&adapter->rx_abs_int_delay, &opt, |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
321 |
adapter); |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
322 |
} else { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
323 |
adapter->rx_abs_int_delay = opt.def; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
324 |
} |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
325 |
} |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
326 |
{ /* Interrupt Throttling Rate */ |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
327 |
const struct e1000_option opt = { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
328 |
.type = range_option, |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
329 |
.name = "Interrupt Throttling Rate (ints/sec)", |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
330 |
.err = "using default of " |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
331 |
__MODULE_STRING(DEFAULT_ITR), |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
332 |
.def = DEFAULT_ITR, |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
333 |
.arg = { .r = { .min = MIN_ITR, |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
334 |
.max = MAX_ITR } } |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
335 |
}; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
336 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
337 |
if (num_InterruptThrottleRate > bd) { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
338 |
adapter->itr = InterruptThrottleRate[bd]; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
339 |
switch (adapter->itr) { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
340 |
case 0: |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
341 |
e_info("%s turned off\n", opt.name); |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
342 |
break; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
343 |
case 1: |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
344 |
e_info("%s set to dynamic mode\n", opt.name); |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
345 |
adapter->itr_setting = adapter->itr; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
346 |
adapter->itr = 20000; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
347 |
break; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
348 |
case 3: |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
349 |
e_info("%s set to dynamic conservative mode\n", |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
350 |
opt.name); |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
351 |
adapter->itr_setting = adapter->itr; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
352 |
adapter->itr = 20000; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
353 |
break; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
354 |
default: |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
355 |
/* |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
356 |
* Save the setting, because the dynamic bits |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
357 |
* change itr. |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
358 |
*/ |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
359 |
if (e1000_validate_option(&adapter->itr, &opt, |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
360 |
adapter) && |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
361 |
(adapter->itr == 3)) { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
362 |
/* |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
363 |
* In case of invalid user value, |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
364 |
* default to conservative mode. |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
365 |
*/ |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
366 |
adapter->itr_setting = adapter->itr; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
367 |
adapter->itr = 20000; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
368 |
} else { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
369 |
/* |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
370 |
* Clear the lower two bits because |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
371 |
* they are used as control. |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
372 |
*/ |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
373 |
adapter->itr_setting = |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
374 |
adapter->itr & ~3; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
375 |
} |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
376 |
break; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
377 |
} |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
378 |
} else { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
379 |
adapter->itr_setting = opt.def; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
380 |
adapter->itr = 20000; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
381 |
} |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
382 |
} |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
383 |
{ /* Interrupt Mode */ |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
384 |
struct e1000_option opt = { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
385 |
.type = range_option, |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
386 |
.name = "Interrupt Mode", |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
387 |
.err = "defaulting to 2 (MSI-X)", |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
388 |
.def = E1000E_INT_MODE_MSIX, |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
389 |
.arg = { .r = { .min = MIN_INTMODE, |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
390 |
.max = MAX_INTMODE } } |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
391 |
}; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
392 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
393 |
if (num_IntMode > bd) { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
394 |
unsigned int int_mode = IntMode[bd]; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
395 |
e1000_validate_option(&int_mode, &opt, adapter); |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
396 |
adapter->int_mode = int_mode; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
397 |
} else { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
398 |
adapter->int_mode = opt.def; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
399 |
} |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
400 |
} |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
401 |
{ /* Smart Power Down */ |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
402 |
const struct e1000_option opt = { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
403 |
.type = enable_option, |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
404 |
.name = "PHY Smart Power Down", |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
405 |
.err = "defaulting to Disabled", |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
406 |
.def = OPTION_DISABLED |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
407 |
}; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
408 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
409 |
if (num_SmartPowerDownEnable > bd) { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
410 |
unsigned int spd = SmartPowerDownEnable[bd]; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
411 |
e1000_validate_option(&spd, &opt, adapter); |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
412 |
if ((adapter->flags & FLAG_HAS_SMART_POWER_DOWN) |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
413 |
&& spd) |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
414 |
adapter->flags |= FLAG_SMART_POWER_DOWN; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
415 |
} |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
416 |
} |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
417 |
{ /* CRC Stripping */ |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
418 |
const struct e1000_option opt = { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
419 |
.type = enable_option, |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
420 |
.name = "CRC Stripping", |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
421 |
.err = "defaulting to enabled", |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
422 |
.def = OPTION_ENABLED |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
423 |
}; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
424 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
425 |
if (num_CrcStripping > bd) { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
426 |
unsigned int crc_stripping = CrcStripping[bd]; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
427 |
e1000_validate_option(&crc_stripping, &opt, adapter); |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
428 |
if (crc_stripping == OPTION_ENABLED) |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
429 |
adapter->flags2 |= FLAG2_CRC_STRIPPING; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
430 |
} else { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
431 |
adapter->flags2 |= FLAG2_CRC_STRIPPING; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
432 |
} |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
433 |
} |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
434 |
{ /* Kumeran Lock Loss Workaround */ |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
435 |
const struct e1000_option opt = { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
436 |
.type = enable_option, |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
437 |
.name = "Kumeran Lock Loss Workaround", |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
438 |
.err = "defaulting to Enabled", |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
439 |
.def = OPTION_ENABLED |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
440 |
}; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
441 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
442 |
if (num_KumeranLockLoss > bd) { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
443 |
unsigned int kmrn_lock_loss = KumeranLockLoss[bd]; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
444 |
e1000_validate_option(&kmrn_lock_loss, &opt, adapter); |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
445 |
if (hw->mac.type == e1000_ich8lan) |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
446 |
e1000e_set_kmrn_lock_loss_workaround_ich8lan(hw, |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
447 |
kmrn_lock_loss); |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
448 |
} else { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
449 |
if (hw->mac.type == e1000_ich8lan) |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
450 |
e1000e_set_kmrn_lock_loss_workaround_ich8lan(hw, |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
451 |
opt.def); |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
452 |
} |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
453 |
} |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
454 |
{ /* Write-protect NVM */ |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
455 |
const struct e1000_option opt = { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
456 |
.type = enable_option, |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
457 |
.name = "Write-protect NVM", |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
458 |
.err = "defaulting to Enabled", |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
459 |
.def = OPTION_ENABLED |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
460 |
}; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
461 |
|
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
462 |
if (adapter->flags & FLAG_IS_ICH) { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
463 |
if (num_WriteProtectNVM > bd) { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
464 |
unsigned int write_protect_nvm = WriteProtectNVM[bd]; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
465 |
e1000_validate_option(&write_protect_nvm, &opt, |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
466 |
adapter); |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
467 |
if (write_protect_nvm) |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
468 |
adapter->flags |= FLAG_READ_ONLY_NVM; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
469 |
} else { |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
470 |
if (opt.def) |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
471 |
adapter->flags |= FLAG_READ_ONLY_NVM; |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
472 |
} |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
473 |
} |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
474 |
} |
729df853b3fb
Added e1000e driver for 2.6.32.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
475 |
} |