1 /*******************************************************************************
4 Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved.
6 This program is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 2 of the License, or (at your option)
11 This program is distributed in the hope that it will be useful, but WITHOUT
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 You should have received a copy of the GNU General Public License along with
17 this program; if not, write to the Free Software Foundation, Inc., 59
18 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 The full GNU General Public License is included in this distribution in the
24 Linux NICS <linux.nics@intel.com>
25 e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
26 Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
28 *******************************************************************************/
32 /* This is the only thing that needs to be changed to adjust the
33 * maximum number of ports that the driver can manage.
36 #define E1000_MAX_NIC 32
38 #define OPTION_UNSET -1
39 #define OPTION_DISABLED 0
40 #define OPTION_ENABLED 1
42 /* All parameters are treated the same, as an integer array of values.
43 * This macro just reduces the need to repeat the same declaration code
44 * over and over (plus this helps to avoid typo bugs).
47 #define E1000_PARAM_INIT { [0 ... E1000_MAX_NIC] = OPTION_UNSET }
48 /* Module Parameters are always initialized to -1, so that the driver
49 * can tell the difference between no user specified value or the
50 * user asking for the default value.
51 * The true default values are loaded in when e1000_check_options is called.
53 * This is a GCC extension to ANSI C.
54 * See the item "Labeled Elements in Initializers" in the section
55 * "Extensions to the C Language Family" of the GCC documentation.
58 #define E1000_PARAM(X, desc) \
59 static int __devinitdata X[E1000_MAX_NIC+1] = E1000_PARAM_INIT; \
60 static int num_##X = 0; \
61 module_param_array_named(X, X, int, &num_##X, 0); \
62 MODULE_PARM_DESC(X, desc);
64 /* Transmit Descriptor Count
66 * Valid Range: 80-256 for 82542 and 82543 gigabit ethernet controllers
67 * Valid Range: 80-4096 for 82544 and newer
72 E1000_PARAM(TxDescriptors
, "Number of transmit descriptors");
74 /* Receive Descriptor Count
76 * Valid Range: 80-256 for 82542 and 82543 gigabit ethernet controllers
77 * Valid Range: 80-4096 for 82544 and newer
82 E1000_PARAM(RxDescriptors
, "Number of receive descriptors");
84 /* User Specified Speed Override
86 * Valid Range: 0, 10, 100, 1000
87 * - 0 - auto-negotiate at all supported speeds
88 * - 10 - only link at 10 Mbps
89 * - 100 - only link at 100 Mbps
90 * - 1000 - only link at 1000 Mbps
95 E1000_PARAM(Speed
, "Speed setting");
97 /* User Specified Duplex Override
100 * - 0 - auto-negotiate for duplex
101 * - 1 - only link at half duplex
102 * - 2 - only link at full duplex
107 E1000_PARAM(Duplex
, "Duplex setting");
109 /* Auto-negotiation Advertisement Override
111 * Valid Range: 0x01-0x0F, 0x20-0x2F (copper); 0x20 (fiber)
113 * The AutoNeg value is a bit mask describing which speed and duplex
114 * combinations should be advertised during auto-negotiation.
115 * The supported speed and duplex modes are listed below
117 * Bit 7 6 5 4 3 2 1 0
118 * Speed (Mbps) N/A N/A 1000 N/A 100 100 10 10
119 * Duplex Full Full Half Full Half
121 * Default Value: 0x2F (copper); 0x20 (fiber)
124 E1000_PARAM(AutoNeg
, "Advertised auto-negotiation setting");
126 /* User Specified Flow Control Override
129 * - 0 - No Flow Control
130 * - 1 - Rx only, respond to PAUSE frames but do not generate them
131 * - 2 - Tx only, generate PAUSE frames but ignore them on receive
132 * - 3 - Full Flow Control Support
134 * Default Value: Read flow control settings from the EEPROM
137 E1000_PARAM(FlowControl
, "Flow Control setting");
139 /* XsumRX - Receive Checksum Offload Enable/Disable
142 * - 0 - disables all checksum offload
143 * - 1 - enables receive IP/TCP/UDP checksum offload
144 * on 82543 and newer -based NICs
149 E1000_PARAM(XsumRX
, "Disable or enable Receive Checksum offload");
151 /* Transmit Interrupt Delay in units of 1.024 microseconds
153 * Valid Range: 0-65535
158 E1000_PARAM(TxIntDelay
, "Transmit Interrupt Delay");
160 /* Transmit Absolute Interrupt Delay in units of 1.024 microseconds
162 * Valid Range: 0-65535
167 E1000_PARAM(TxAbsIntDelay
, "Transmit Absolute Interrupt Delay");
169 /* Receive Interrupt Delay in units of 1.024 microseconds
171 * Valid Range: 0-65535
176 E1000_PARAM(RxIntDelay
, "Receive Interrupt Delay");
178 /* Receive Absolute Interrupt Delay in units of 1.024 microseconds
180 * Valid Range: 0-65535
185 E1000_PARAM(RxAbsIntDelay
, "Receive Absolute Interrupt Delay");
187 /* Interrupt Throttle Rate (interrupts/sec)
189 * Valid Range: 100-100000 (0=off, 1=dynamic)
191 * Default Value: 8000
194 E1000_PARAM(InterruptThrottleRate
, "Interrupt Throttling Rate");
196 /* Enable Smart Power Down of the PHY
200 * Default Value: 0 (disabled)
203 E1000_PARAM(SmartPowerDownEnable
, "Enable PHY smart power down");
205 /* Enable Kumeran Lock Loss workaround
209 * Default Value: 1 (enabled)
212 E1000_PARAM(KumeranLockLoss
, "Enable Kumeran lock loss workaround");
214 #define AUTONEG_ADV_DEFAULT 0x2F
215 #define AUTONEG_ADV_MASK 0x2F
216 #define FLOW_CONTROL_DEFAULT FLOW_CONTROL_FULL
218 #define DEFAULT_RDTR 0
219 #define MAX_RXDELAY 0xFFFF
220 #define MIN_RXDELAY 0
222 #define DEFAULT_RADV 128
223 #define MAX_RXABSDELAY 0xFFFF
224 #define MIN_RXABSDELAY 0
226 #define DEFAULT_TIDV 64
227 #define MAX_TXDELAY 0xFFFF
228 #define MIN_TXDELAY 0
230 #define DEFAULT_TADV 64
231 #define MAX_TXABSDELAY 0xFFFF
232 #define MIN_TXABSDELAY 0
234 #define DEFAULT_ITR 8000
235 #define MAX_ITR 100000
238 struct e1000_option
{
239 enum { enable_option
, range_option
, list_option
} type
;
244 struct { /* range_option info */
248 struct { /* list_option info */
250 struct e1000_opt_list
{ int i
; char *str
; } *p
;
256 e1000_validate_option(int *value
, struct e1000_option
*opt
,
257 struct e1000_adapter
*adapter
)
259 if (*value
== OPTION_UNSET
) {
268 DPRINTK(PROBE
, INFO
, "%s Enabled\n", opt
->name
);
270 case OPTION_DISABLED
:
271 DPRINTK(PROBE
, INFO
, "%s Disabled\n", opt
->name
);
276 if (*value
>= opt
->arg
.r
.min
&& *value
<= opt
->arg
.r
.max
) {
278 "%s set to %i\n", opt
->name
, *value
);
284 struct e1000_opt_list
*ent
;
286 for (i
= 0; i
< opt
->arg
.l
.nr
; i
++) {
287 ent
= &opt
->arg
.l
.p
[i
];
288 if (*value
== ent
->i
) {
289 if (ent
->str
[0] != '\0')
290 DPRINTK(PROBE
, INFO
, "%s\n", ent
->str
);
300 DPRINTK(PROBE
, INFO
, "Invalid %s value specified (%i) %s\n",
301 opt
->name
, *value
, opt
->err
);
306 static void e1000_check_fiber_options(struct e1000_adapter
*adapter
);
307 static void e1000_check_copper_options(struct e1000_adapter
*adapter
);
310 * e1000_check_options - Range Checking for Command Line Parameters
311 * @adapter: board private structure
313 * This routine checks all command line parameters for valid user
314 * input. If an invalid value is given, or if no user specified
315 * value exists, a default value is used. The final value is stored
316 * in a variable in the adapter structure.
320 e1000_check_options(struct e1000_adapter
*adapter
)
322 int bd
= adapter
->bd_number
;
323 if (bd
>= E1000_MAX_NIC
) {
324 DPRINTK(PROBE
, NOTICE
,
325 "Warning: no configuration for board #%i\n", bd
);
326 DPRINTK(PROBE
, NOTICE
, "Using defaults for all values\n");
329 { /* Transmit Descriptor Count */
330 struct e1000_option opt
= {
331 .type
= range_option
,
332 .name
= "Transmit Descriptors",
333 .err
= "using default of "
334 __MODULE_STRING(E1000_DEFAULT_TXD
),
335 .def
= E1000_DEFAULT_TXD
,
336 .arg
= { .r
= { .min
= E1000_MIN_TXD
}}
338 struct e1000_tx_ring
*tx_ring
= adapter
->tx_ring
;
340 e1000_mac_type mac_type
= adapter
->hw
.mac_type
;
341 opt
.arg
.r
.max
= mac_type
< e1000_82544
?
342 E1000_MAX_TXD
: E1000_MAX_82544_TXD
;
344 if (num_TxDescriptors
> bd
) {
345 tx_ring
->count
= TxDescriptors
[bd
];
346 e1000_validate_option(&tx_ring
->count
, &opt
, adapter
);
347 E1000_ROUNDUP(tx_ring
->count
,
348 REQ_TX_DESCRIPTOR_MULTIPLE
);
350 tx_ring
->count
= opt
.def
;
352 for (i
= 0; i
< adapter
->num_tx_queues
; i
++)
353 tx_ring
[i
].count
= tx_ring
->count
;
355 { /* Receive Descriptor Count */
356 struct e1000_option opt
= {
357 .type
= range_option
,
358 .name
= "Receive Descriptors",
359 .err
= "using default of "
360 __MODULE_STRING(E1000_DEFAULT_RXD
),
361 .def
= E1000_DEFAULT_RXD
,
362 .arg
= { .r
= { .min
= E1000_MIN_RXD
}}
364 struct e1000_rx_ring
*rx_ring
= adapter
->rx_ring
;
366 e1000_mac_type mac_type
= adapter
->hw
.mac_type
;
367 opt
.arg
.r
.max
= mac_type
< e1000_82544
? E1000_MAX_RXD
:
370 if (num_RxDescriptors
> bd
) {
371 rx_ring
->count
= RxDescriptors
[bd
];
372 e1000_validate_option(&rx_ring
->count
, &opt
, adapter
);
373 E1000_ROUNDUP(rx_ring
->count
,
374 REQ_RX_DESCRIPTOR_MULTIPLE
);
376 rx_ring
->count
= opt
.def
;
378 for (i
= 0; i
< adapter
->num_rx_queues
; i
++)
379 rx_ring
[i
].count
= rx_ring
->count
;
381 { /* Checksum Offload Enable/Disable */
382 struct e1000_option opt
= {
383 .type
= enable_option
,
384 .name
= "Checksum Offload",
385 .err
= "defaulting to Enabled",
386 .def
= OPTION_ENABLED
389 if (num_XsumRX
> bd
) {
390 int rx_csum
= XsumRX
[bd
];
391 e1000_validate_option(&rx_csum
, &opt
, adapter
);
392 adapter
->rx_csum
= rx_csum
;
394 adapter
->rx_csum
= opt
.def
;
399 struct e1000_opt_list fc_list
[] =
400 {{ e1000_fc_none
, "Flow Control Disabled" },
401 { e1000_fc_rx_pause
,"Flow Control Receive Only" },
402 { e1000_fc_tx_pause
,"Flow Control Transmit Only" },
403 { e1000_fc_full
, "Flow Control Enabled" },
404 { e1000_fc_default
, "Flow Control Hardware Default" }};
406 struct e1000_option opt
= {
408 .name
= "Flow Control",
409 .err
= "reading default settings from EEPROM",
410 .def
= e1000_fc_default
,
411 .arg
= { .l
= { .nr
= ARRAY_SIZE(fc_list
),
415 if (num_FlowControl
> bd
) {
416 int fc
= FlowControl
[bd
];
417 e1000_validate_option(&fc
, &opt
, adapter
);
418 adapter
->hw
.fc
= adapter
->hw
.original_fc
= fc
;
420 adapter
->hw
.fc
= adapter
->hw
.original_fc
= opt
.def
;
423 { /* Transmit Interrupt Delay */
424 struct e1000_option opt
= {
425 .type
= range_option
,
426 .name
= "Transmit Interrupt Delay",
427 .err
= "using default of " __MODULE_STRING(DEFAULT_TIDV
),
429 .arg
= { .r
= { .min
= MIN_TXDELAY
,
430 .max
= MAX_TXDELAY
}}
433 if (num_TxIntDelay
> bd
) {
434 adapter
->tx_int_delay
= TxIntDelay
[bd
];
435 e1000_validate_option(&adapter
->tx_int_delay
, &opt
,
438 adapter
->tx_int_delay
= opt
.def
;
441 { /* Transmit Absolute Interrupt Delay */
442 struct e1000_option opt
= {
443 .type
= range_option
,
444 .name
= "Transmit Absolute Interrupt Delay",
445 .err
= "using default of " __MODULE_STRING(DEFAULT_TADV
),
447 .arg
= { .r
= { .min
= MIN_TXABSDELAY
,
448 .max
= MAX_TXABSDELAY
}}
451 if (num_TxAbsIntDelay
> bd
) {
452 adapter
->tx_abs_int_delay
= TxAbsIntDelay
[bd
];
453 e1000_validate_option(&adapter
->tx_abs_int_delay
, &opt
,
456 adapter
->tx_abs_int_delay
= opt
.def
;
459 { /* Receive Interrupt Delay */
460 struct e1000_option opt
= {
461 .type
= range_option
,
462 .name
= "Receive Interrupt Delay",
463 .err
= "using default of " __MODULE_STRING(DEFAULT_RDTR
),
465 .arg
= { .r
= { .min
= MIN_RXDELAY
,
466 .max
= MAX_RXDELAY
}}
469 if (num_RxIntDelay
> bd
) {
470 adapter
->rx_int_delay
= RxIntDelay
[bd
];
471 e1000_validate_option(&adapter
->rx_int_delay
, &opt
,
474 adapter
->rx_int_delay
= opt
.def
;
477 { /* Receive Absolute Interrupt Delay */
478 struct e1000_option opt
= {
479 .type
= range_option
,
480 .name
= "Receive Absolute Interrupt Delay",
481 .err
= "using default of " __MODULE_STRING(DEFAULT_RADV
),
483 .arg
= { .r
= { .min
= MIN_RXABSDELAY
,
484 .max
= MAX_RXABSDELAY
}}
487 if (num_RxAbsIntDelay
> bd
) {
488 adapter
->rx_abs_int_delay
= RxAbsIntDelay
[bd
];
489 e1000_validate_option(&adapter
->rx_abs_int_delay
, &opt
,
492 adapter
->rx_abs_int_delay
= opt
.def
;
495 { /* Interrupt Throttling Rate */
496 struct e1000_option opt
= {
497 .type
= range_option
,
498 .name
= "Interrupt Throttling Rate (ints/sec)",
499 .err
= "using default of " __MODULE_STRING(DEFAULT_ITR
),
501 .arg
= { .r
= { .min
= MIN_ITR
,
505 if (num_InterruptThrottleRate
> bd
) {
506 adapter
->itr
= InterruptThrottleRate
[bd
];
507 switch (adapter
->itr
) {
509 DPRINTK(PROBE
, INFO
, "%s turned off\n",
513 DPRINTK(PROBE
, INFO
, "%s set to dynamic mode\n",
517 e1000_validate_option(&adapter
->itr
, &opt
,
522 adapter
->itr
= opt
.def
;
525 { /* Smart Power Down */
526 struct e1000_option opt
= {
527 .type
= enable_option
,
528 .name
= "PHY Smart Power Down",
529 .err
= "defaulting to Disabled",
530 .def
= OPTION_DISABLED
533 if (num_SmartPowerDownEnable
> bd
) {
534 int spd
= SmartPowerDownEnable
[bd
];
535 e1000_validate_option(&spd
, &opt
, adapter
);
536 adapter
->smart_power_down
= spd
;
538 adapter
->smart_power_down
= opt
.def
;
541 { /* Kumeran Lock Loss Workaround */
542 struct e1000_option opt
= {
543 .type
= enable_option
,
544 .name
= "Kumeran Lock Loss Workaround",
545 .err
= "defaulting to Enabled",
546 .def
= OPTION_ENABLED
549 if (num_KumeranLockLoss
> bd
) {
550 int kmrn_lock_loss
= KumeranLockLoss
[bd
];
551 e1000_validate_option(&kmrn_lock_loss
, &opt
, adapter
);
552 adapter
->hw
.kmrn_lock_loss_workaround_disabled
= !kmrn_lock_loss
;
554 adapter
->hw
.kmrn_lock_loss_workaround_disabled
= !opt
.def
;
558 switch (adapter
->hw
.media_type
) {
559 case e1000_media_type_fiber
:
560 case e1000_media_type_internal_serdes
:
561 e1000_check_fiber_options(adapter
);
563 case e1000_media_type_copper
:
564 e1000_check_copper_options(adapter
);
572 * e1000_check_fiber_options - Range Checking for Link Options, Fiber Version
573 * @adapter: board private structure
575 * Handles speed and duplex options on fiber adapters
578 static void __devinit
579 e1000_check_fiber_options(struct e1000_adapter
*adapter
)
581 int bd
= adapter
->bd_number
;
582 if (num_Speed
> bd
) {
583 DPRINTK(PROBE
, INFO
, "Speed not valid for fiber adapters, "
584 "parameter ignored\n");
587 if (num_Duplex
> bd
) {
588 DPRINTK(PROBE
, INFO
, "Duplex not valid for fiber adapters, "
589 "parameter ignored\n");
592 if ((num_AutoNeg
> bd
) && (AutoNeg
[bd
] != 0x20)) {
593 DPRINTK(PROBE
, INFO
, "AutoNeg other than 1000/Full is "
594 "not valid for fiber adapters, "
595 "parameter ignored\n");
600 * e1000_check_copper_options - Range Checking for Link Options, Copper Version
601 * @adapter: board private structure
603 * Handles speed and duplex options on copper adapters
606 static void __devinit
607 e1000_check_copper_options(struct e1000_adapter
*adapter
)
610 int bd
= adapter
->bd_number
;
613 struct e1000_opt_list speed_list
[] = {{ 0, "" },
618 struct e1000_option opt
= {
621 .err
= "parameter ignored",
623 .arg
= { .l
= { .nr
= ARRAY_SIZE(speed_list
),
627 if (num_Speed
> bd
) {
629 e1000_validate_option(&speed
, &opt
, adapter
);
635 struct e1000_opt_list dplx_list
[] = {{ 0, "" },
637 { FULL_DUPLEX
, "" }};
639 struct e1000_option opt
= {
642 .err
= "parameter ignored",
644 .arg
= { .l
= { .nr
= ARRAY_SIZE(dplx_list
),
648 if (e1000_check_phy_reset_block(&adapter
->hw
)) {
650 "Link active due to SoL/IDER Session. "
651 "Speed/Duplex/AutoNeg parameter ignored.\n");
654 if (num_Duplex
> bd
) {
656 e1000_validate_option(&dplx
, &opt
, adapter
);
662 if ((num_AutoNeg
> bd
) && (speed
!= 0 || dplx
!= 0)) {
664 "AutoNeg specified along with Speed or Duplex, "
665 "parameter ignored\n");
666 adapter
->hw
.autoneg_advertised
= AUTONEG_ADV_DEFAULT
;
667 } else { /* Autoneg */
668 struct e1000_opt_list an_list
[] =
669 #define AA "AutoNeg advertising "
670 {{ 0x01, AA
"10/HD" },
671 { 0x02, AA
"10/FD" },
672 { 0x03, AA
"10/FD, 10/HD" },
673 { 0x04, AA
"100/HD" },
674 { 0x05, AA
"100/HD, 10/HD" },
675 { 0x06, AA
"100/HD, 10/FD" },
676 { 0x07, AA
"100/HD, 10/FD, 10/HD" },
677 { 0x08, AA
"100/FD" },
678 { 0x09, AA
"100/FD, 10/HD" },
679 { 0x0a, AA
"100/FD, 10/FD" },
680 { 0x0b, AA
"100/FD, 10/FD, 10/HD" },
681 { 0x0c, AA
"100/FD, 100/HD" },
682 { 0x0d, AA
"100/FD, 100/HD, 10/HD" },
683 { 0x0e, AA
"100/FD, 100/HD, 10/FD" },
684 { 0x0f, AA
"100/FD, 100/HD, 10/FD, 10/HD" },
685 { 0x20, AA
"1000/FD" },
686 { 0x21, AA
"1000/FD, 10/HD" },
687 { 0x22, AA
"1000/FD, 10/FD" },
688 { 0x23, AA
"1000/FD, 10/FD, 10/HD" },
689 { 0x24, AA
"1000/FD, 100/HD" },
690 { 0x25, AA
"1000/FD, 100/HD, 10/HD" },
691 { 0x26, AA
"1000/FD, 100/HD, 10/FD" },
692 { 0x27, AA
"1000/FD, 100/HD, 10/FD, 10/HD" },
693 { 0x28, AA
"1000/FD, 100/FD" },
694 { 0x29, AA
"1000/FD, 100/FD, 10/HD" },
695 { 0x2a, AA
"1000/FD, 100/FD, 10/FD" },
696 { 0x2b, AA
"1000/FD, 100/FD, 10/FD, 10/HD" },
697 { 0x2c, AA
"1000/FD, 100/FD, 100/HD" },
698 { 0x2d, AA
"1000/FD, 100/FD, 100/HD, 10/HD" },
699 { 0x2e, AA
"1000/FD, 100/FD, 100/HD, 10/FD" },
700 { 0x2f, AA
"1000/FD, 100/FD, 100/HD, 10/FD, 10/HD" }};
702 struct e1000_option opt
= {
705 .err
= "parameter ignored",
706 .def
= AUTONEG_ADV_DEFAULT
,
707 .arg
= { .l
= { .nr
= ARRAY_SIZE(an_list
),
711 if (num_AutoNeg
> bd
) {
713 e1000_validate_option(&an
, &opt
, adapter
);
717 adapter
->hw
.autoneg_advertised
= an
;
720 switch (speed
+ dplx
) {
722 adapter
->hw
.autoneg
= adapter
->fc_autoneg
= 1;
723 if ((num_Speed
> bd
) && (speed
!= 0 || dplx
!= 0))
725 "Speed and duplex autonegotiation enabled\n");
728 DPRINTK(PROBE
, INFO
, "Half Duplex specified without Speed\n");
729 DPRINTK(PROBE
, INFO
, "Using Autonegotiation at "
730 "Half Duplex only\n");
731 adapter
->hw
.autoneg
= adapter
->fc_autoneg
= 1;
732 adapter
->hw
.autoneg_advertised
= ADVERTISE_10_HALF
|
736 DPRINTK(PROBE
, INFO
, "Full Duplex specified without Speed\n");
737 DPRINTK(PROBE
, INFO
, "Using Autonegotiation at "
738 "Full Duplex only\n");
739 adapter
->hw
.autoneg
= adapter
->fc_autoneg
= 1;
740 adapter
->hw
.autoneg_advertised
= ADVERTISE_10_FULL
|
745 DPRINTK(PROBE
, INFO
, "10 Mbps Speed specified "
747 DPRINTK(PROBE
, INFO
, "Using Autonegotiation at 10 Mbps only\n");
748 adapter
->hw
.autoneg
= adapter
->fc_autoneg
= 1;
749 adapter
->hw
.autoneg_advertised
= ADVERTISE_10_HALF
|
752 case SPEED_10
+ HALF_DUPLEX
:
753 DPRINTK(PROBE
, INFO
, "Forcing to 10 Mbps Half Duplex\n");
754 adapter
->hw
.autoneg
= adapter
->fc_autoneg
= 0;
755 adapter
->hw
.forced_speed_duplex
= e1000_10_half
;
756 adapter
->hw
.autoneg_advertised
= 0;
758 case SPEED_10
+ FULL_DUPLEX
:
759 DPRINTK(PROBE
, INFO
, "Forcing to 10 Mbps Full Duplex\n");
760 adapter
->hw
.autoneg
= adapter
->fc_autoneg
= 0;
761 adapter
->hw
.forced_speed_duplex
= e1000_10_full
;
762 adapter
->hw
.autoneg_advertised
= 0;
765 DPRINTK(PROBE
, INFO
, "100 Mbps Speed specified "
767 DPRINTK(PROBE
, INFO
, "Using Autonegotiation at "
769 adapter
->hw
.autoneg
= adapter
->fc_autoneg
= 1;
770 adapter
->hw
.autoneg_advertised
= ADVERTISE_100_HALF
|
773 case SPEED_100
+ HALF_DUPLEX
:
774 DPRINTK(PROBE
, INFO
, "Forcing to 100 Mbps Half Duplex\n");
775 adapter
->hw
.autoneg
= adapter
->fc_autoneg
= 0;
776 adapter
->hw
.forced_speed_duplex
= e1000_100_half
;
777 adapter
->hw
.autoneg_advertised
= 0;
779 case SPEED_100
+ FULL_DUPLEX
:
780 DPRINTK(PROBE
, INFO
, "Forcing to 100 Mbps Full Duplex\n");
781 adapter
->hw
.autoneg
= adapter
->fc_autoneg
= 0;
782 adapter
->hw
.forced_speed_duplex
= e1000_100_full
;
783 adapter
->hw
.autoneg_advertised
= 0;
786 DPRINTK(PROBE
, INFO
, "1000 Mbps Speed specified without "
789 "Using Autonegotiation at 1000 Mbps "
790 "Full Duplex only\n");
791 adapter
->hw
.autoneg
= adapter
->fc_autoneg
= 1;
792 adapter
->hw
.autoneg_advertised
= ADVERTISE_1000_FULL
;
794 case SPEED_1000
+ HALF_DUPLEX
:
796 "Half Duplex is not supported at 1000 Mbps\n");
798 "Using Autonegotiation at 1000 Mbps "
799 "Full Duplex only\n");
800 adapter
->hw
.autoneg
= adapter
->fc_autoneg
= 1;
801 adapter
->hw
.autoneg_advertised
= ADVERTISE_1000_FULL
;
803 case SPEED_1000
+ FULL_DUPLEX
:
805 "Using Autonegotiation at 1000 Mbps Full Duplex only\n");
806 adapter
->hw
.autoneg
= adapter
->fc_autoneg
= 1;
807 adapter
->hw
.autoneg_advertised
= ADVERTISE_1000_FULL
;
813 /* Speed, AutoNeg and MDI/MDI-X must all play nice */
814 if (e1000_validate_mdi_setting(&(adapter
->hw
)) < 0) {
816 "Speed, AutoNeg and MDI-X specifications are "
817 "incompatible. Setting MDI-X to a compatible value.\n");