Lines Matching +full:max +full:- +full:speed
1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright(c) 1999 - 2006 Intel Corporation. */
12 #define OPTION_UNSET -1
30 * Valid Range: 80-256 for 82542 and 82543 gigabit ethernet controllers
31 * Valid Range: 80-4096 for 82544 and newer
39 * Valid Range: 80-256 for 82542 and 82543 gigabit ethernet controllers
40 * Valid Range: 80-4096 for 82544 and newer
46 /* User Specified Speed Override
49 * - 0 - auto-negotiate at all supported speeds
50 * - 10 - only link at 10 Mbps
51 * - 100 - only link at 100 Mbps
52 * - 1000 - only link at 1000 Mbps
56 E1000_PARAM(Speed, "Speed setting");
60 * Valid Range: 0-2
61 * - 0 - auto-negotiate for duplex
62 * - 1 - only link at half duplex
63 * - 2 - only link at full duplex
69 /* Auto-negotiation Advertisement Override
71 * Valid Range: 0x01-0x0F, 0x20-0x2F (copper); 0x20 (fiber)
73 * The AutoNeg value is a bit mask describing which speed and duplex
74 * combinations should be advertised during auto-negotiation.
75 * The supported speed and duplex modes are listed below
78 * Speed (Mbps) N/A N/A 1000 N/A 100 100 10 10
83 E1000_PARAM(AutoNeg, "Advertised auto-negotiation setting");
89 * Valid Range: 0-3
90 * - 0 - No Flow Control
91 * - 1 - Rx only, respond to PAUSE frames but do not generate them
92 * - 2 - Tx only, generate PAUSE frames but ignore them on receive
93 * - 3 - Full Flow Control Support
100 /* XsumRX - Receive Checksum Offload Enable/Disable
103 * - 0 - disables all checksum offload
104 * - 1 - enables receive IP/TCP/UDP checksum offload
105 * on 82543 and newer -based NICs
114 * Valid Range: 0-65535
123 * Valid Range: 0-65535
133 * Valid Range: 0-65535
142 * Valid Range: 0-65535
151 * Valid Range: 100-100000 (0=off, 1=dynamic, 3=dynamic conservative)
174 int max; member
188 *value = opt->def; in e1000_validate_option()
192 switch (opt->type) { in e1000_validate_option()
196 e_dev_info("%s Enabled\n", opt->name); in e1000_validate_option()
199 e_dev_info("%s Disabled\n", opt->name); in e1000_validate_option()
204 if (*value >= opt->arg.r.min && *value <= opt->arg.r.max) { in e1000_validate_option()
205 e_dev_info("%s set to %i\n", opt->name, *value); in e1000_validate_option()
213 for (i = 0; i < opt->arg.l.nr; i++) { in e1000_validate_option()
214 ent = &opt->arg.l.p[i]; in e1000_validate_option()
215 if (*value == ent->i) { in e1000_validate_option()
216 if (ent->str[0] != '\0') in e1000_validate_option()
217 e_dev_info("%s\n", ent->str); in e1000_validate_option()
228 opt->name, *value, opt->err); in e1000_validate_option()
229 *value = opt->def; in e1000_validate_option()
230 return -1; in e1000_validate_option()
237 * e1000_check_options - Range Checking for Command Line Parameters
248 int bd = adapter->bd_number; in e1000_check_options()
256 struct e1000_tx_ring *tx_ring = adapter->tx_ring; in e1000_check_options()
258 e1000_mac_type mac_type = adapter->hw.mac_type; in e1000_check_options()
268 .max = mac_type < e1000_82544 ? E1000_MAX_TXD : E1000_MAX_82544_TXD in e1000_check_options()
273 tx_ring->count = TxDescriptors[bd]; in e1000_check_options()
274 e1000_validate_option(&tx_ring->count, &opt, adapter); in e1000_check_options()
275 tx_ring->count = ALIGN(tx_ring->count, in e1000_check_options()
278 tx_ring->count = opt.def; in e1000_check_options()
280 for (i = 0; i < adapter->num_tx_queues; i++) in e1000_check_options()
281 tx_ring[i].count = tx_ring->count; in e1000_check_options()
284 struct e1000_rx_ring *rx_ring = adapter->rx_ring; in e1000_check_options()
286 e1000_mac_type mac_type = adapter->hw.mac_type; in e1000_check_options()
296 .max = mac_type < e1000_82544 ? E1000_MAX_RXD : in e1000_check_options()
302 rx_ring->count = RxDescriptors[bd]; in e1000_check_options()
303 e1000_validate_option(&rx_ring->count, &opt, adapter); in e1000_check_options()
304 rx_ring->count = ALIGN(rx_ring->count, in e1000_check_options()
307 rx_ring->count = opt.def; in e1000_check_options()
309 for (i = 0; i < adapter->num_rx_queues; i++) in e1000_check_options()
310 rx_ring[i].count = rx_ring->count; in e1000_check_options()
323 adapter->rx_csum = rx_csum; in e1000_check_options()
325 adapter->rx_csum = opt.def; in e1000_check_options()
350 adapter->hw.fc = adapter->hw.original_fc = fc; in e1000_check_options()
352 adapter->hw.fc = adapter->hw.original_fc = opt.def; in e1000_check_options()
362 .max = MAX_TXDELAY }} in e1000_check_options()
366 adapter->tx_int_delay = TxIntDelay[bd]; in e1000_check_options()
367 e1000_validate_option(&adapter->tx_int_delay, &opt, in e1000_check_options()
370 adapter->tx_int_delay = opt.def; in e1000_check_options()
380 .max = MAX_TXABSDELAY }} in e1000_check_options()
384 adapter->tx_abs_int_delay = TxAbsIntDelay[bd]; in e1000_check_options()
385 e1000_validate_option(&adapter->tx_abs_int_delay, &opt, in e1000_check_options()
388 adapter->tx_abs_int_delay = opt.def; in e1000_check_options()
398 .max = MAX_RXDELAY }} in e1000_check_options()
402 adapter->rx_int_delay = RxIntDelay[bd]; in e1000_check_options()
403 e1000_validate_option(&adapter->rx_int_delay, &opt, in e1000_check_options()
406 adapter->rx_int_delay = opt.def; in e1000_check_options()
416 .max = MAX_RXABSDELAY }} in e1000_check_options()
420 adapter->rx_abs_int_delay = RxAbsIntDelay[bd]; in e1000_check_options()
421 e1000_validate_option(&adapter->rx_abs_int_delay, &opt, in e1000_check_options()
424 adapter->rx_abs_int_delay = opt.def; in e1000_check_options()
434 .max = MAX_ITR }} in e1000_check_options()
438 adapter->itr = InterruptThrottleRate[bd]; in e1000_check_options()
439 switch (adapter->itr) { in e1000_check_options()
446 adapter->itr_setting = adapter->itr; in e1000_check_options()
447 adapter->itr = 20000; in e1000_check_options()
452 adapter->itr_setting = adapter->itr; in e1000_check_options()
453 adapter->itr = 20000; in e1000_check_options()
457 "(2000-8000) ints mode\n", opt.name); in e1000_check_options()
458 adapter->itr_setting = adapter->itr; in e1000_check_options()
461 e1000_validate_option(&adapter->itr, &opt, in e1000_check_options()
468 adapter->itr_setting = adapter->itr & ~3; in e1000_check_options()
472 adapter->itr_setting = opt.def; in e1000_check_options()
473 adapter->itr = 20000; in e1000_check_options()
487 adapter->smart_power_down = spd; in e1000_check_options()
489 adapter->smart_power_down = opt.def; in e1000_check_options()
493 switch (adapter->hw.media_type) { in e1000_check_options()
507 * e1000_check_fiber_options - Range Checking for Link Options, Fiber Version
510 * Handles speed and duplex options on fiber adapters
514 int bd = adapter->bd_number; in e1000_check_fiber_options()
516 e_dev_info("Speed not valid for fiber adapters, parameter " in e1000_check_fiber_options()
532 * e1000_check_copper_options - Range Checking for Link Options, Copper Version
535 * Handles speed and duplex options on copper adapters
540 unsigned int speed, dplx, an; in e1000_check_copper_options() local
541 int bd = adapter->bd_number; in e1000_check_copper_options()
543 { /* Speed */ in e1000_check_copper_options()
552 .name = "Speed", in e1000_check_copper_options()
560 speed = Speed[bd]; in e1000_check_copper_options()
561 e1000_validate_option(&speed, &opt, adapter); in e1000_check_copper_options()
563 speed = opt.def; in e1000_check_copper_options()
589 if ((num_AutoNeg > bd) && (speed != 0 || dplx != 0)) { in e1000_check_copper_options()
590 e_dev_info("AutoNeg specified along with Speed or Duplex, " in e1000_check_copper_options()
592 adapter->hw.autoneg_advertised = AUTONEG_ADV_DEFAULT; in e1000_check_copper_options()
643 adapter->hw.autoneg_advertised = an; in e1000_check_copper_options()
646 switch (speed + dplx) { in e1000_check_copper_options()
648 adapter->hw.autoneg = adapter->fc_autoneg = 1; in e1000_check_copper_options()
649 if ((num_Speed > bd) && (speed != 0 || dplx != 0)) in e1000_check_copper_options()
650 e_dev_info("Speed and duplex autonegotiation " in e1000_check_copper_options()
654 e_dev_info("Half Duplex specified without Speed\n"); in e1000_check_copper_options()
656 adapter->hw.autoneg = adapter->fc_autoneg = 1; in e1000_check_copper_options()
657 adapter->hw.autoneg_advertised = ADVERTISE_10_HALF | in e1000_check_copper_options()
661 e_dev_info("Full Duplex specified without Speed\n"); in e1000_check_copper_options()
663 adapter->hw.autoneg = adapter->fc_autoneg = 1; in e1000_check_copper_options()
664 adapter->hw.autoneg_advertised = ADVERTISE_10_FULL | in e1000_check_copper_options()
669 e_dev_info("10 Mbps Speed specified without Duplex\n"); in e1000_check_copper_options()
671 adapter->hw.autoneg = adapter->fc_autoneg = 1; in e1000_check_copper_options()
672 adapter->hw.autoneg_advertised = ADVERTISE_10_HALF | in e1000_check_copper_options()
677 adapter->hw.autoneg = adapter->fc_autoneg = 0; in e1000_check_copper_options()
678 adapter->hw.forced_speed_duplex = e1000_10_half; in e1000_check_copper_options()
679 adapter->hw.autoneg_advertised = 0; in e1000_check_copper_options()
683 adapter->hw.autoneg = adapter->fc_autoneg = 0; in e1000_check_copper_options()
684 adapter->hw.forced_speed_duplex = e1000_10_full; in e1000_check_copper_options()
685 adapter->hw.autoneg_advertised = 0; in e1000_check_copper_options()
688 e_dev_info("100 Mbps Speed specified without Duplex\n"); in e1000_check_copper_options()
690 adapter->hw.autoneg = adapter->fc_autoneg = 1; in e1000_check_copper_options()
691 adapter->hw.autoneg_advertised = ADVERTISE_100_HALF | in e1000_check_copper_options()
696 adapter->hw.autoneg = adapter->fc_autoneg = 0; in e1000_check_copper_options()
697 adapter->hw.forced_speed_duplex = e1000_100_half; in e1000_check_copper_options()
698 adapter->hw.autoneg_advertised = 0; in e1000_check_copper_options()
702 adapter->hw.autoneg = adapter->fc_autoneg = 0; in e1000_check_copper_options()
703 adapter->hw.forced_speed_duplex = e1000_100_full; in e1000_check_copper_options()
704 adapter->hw.autoneg_advertised = 0; in e1000_check_copper_options()
707 e_dev_info("1000 Mbps Speed specified without Duplex\n"); in e1000_check_copper_options()
716 adapter->hw.autoneg = adapter->fc_autoneg = 1; in e1000_check_copper_options()
717 adapter->hw.autoneg_advertised = ADVERTISE_1000_FULL; in e1000_check_copper_options()
723 /* Speed, AutoNeg and MDI/MDI-X must all play nice */ in e1000_check_copper_options()
724 if (e1000_validate_mdi_setting(&(adapter->hw)) < 0) { in e1000_check_copper_options()
725 e_dev_info("Speed, AutoNeg and MDI-X specs are incompatible. " in e1000_check_copper_options()
726 "Setting MDI-X to a compatible value.\n"); in e1000_check_copper_options()