Lines Matching +full:phy +full:- +full:input +full:- +full:delay +full:- +full:legacy

1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright(c) 1999 - 2018 Intel Corporation. */
15 #define OPTION_UNSET -1
36 /* Transmit Interrupt Delay in units of 1.024 microseconds
37 * Tx interrupt delay needs to typically be set to something non-zero
39 * Valid Range: 0-65535
41 E1000_PARAM(TxIntDelay, "Transmit Interrupt Delay");
46 /* Transmit Absolute Interrupt Delay in units of 1.024 microseconds
48 * Valid Range: 0-65535
50 E1000_PARAM(TxAbsIntDelay, "Transmit Absolute Interrupt Delay");
55 /* Receive Interrupt Delay in units of 1.024 microseconds
60 * Valid Range: 0-65535
62 E1000_PARAM(RxIntDelay, "Receive Interrupt Delay");
68 /* Receive Absolute Interrupt Delay in units of 1.024 microseconds
72 * Valid Range: 0-65535
74 E1000_PARAM(RxAbsIntDelay, "Receive Absolute Interrupt Delay");
82 * Valid Range: 100-100000 or one of: 0=off, 1=dynamic, 3=dynamic conservative
93 * legacy=0, MSI=1, MSI-X=2
95 * When MSI/MSI-X support is enabled in kernel-
96 * Default Value: 2 (MSI-X) when supported by hardware, 1 (MSI) otherwise
97 * When MSI/MSI-X support is not enabled in kernel-
98 * Default Value: 0 (legacy)
107 /* Enable Smart Power Down of the PHY
113 E1000_PARAM(SmartPowerDownEnable, "Enable PHY smart power down");
130 "Write-protect NVM [WARNING: disabling this can lead to corrupted NVM]");
168 *value = opt->def; in e1000_validate_option()
172 switch (opt->type) { in e1000_validate_option()
176 dev_info(&adapter->pdev->dev, "%s Enabled\n", in e1000_validate_option()
177 opt->name); in e1000_validate_option()
180 dev_info(&adapter->pdev->dev, "%s Disabled\n", in e1000_validate_option()
181 opt->name); in e1000_validate_option()
186 if (*value >= opt->arg.r.min && *value <= opt->arg.r.max) { in e1000_validate_option()
187 dev_info(&adapter->pdev->dev, "%s set to %i\n", in e1000_validate_option()
188 opt->name, *value); in e1000_validate_option()
196 for (i = 0; i < opt->arg.l.nr; i++) { in e1000_validate_option()
197 ent = &opt->arg.l.p[i]; in e1000_validate_option()
198 if (*value == ent->i) { in e1000_validate_option()
199 if (ent->str[0] != '\0') in e1000_validate_option()
200 dev_info(&adapter->pdev->dev, "%s\n", in e1000_validate_option()
201 ent->str); in e1000_validate_option()
211 dev_info(&adapter->pdev->dev, "Invalid %s value specified (%i) %s\n", in e1000_validate_option()
212 opt->name, *value, opt->err); in e1000_validate_option()
213 *value = opt->def; in e1000_validate_option()
214 return -1; in e1000_validate_option()
218 * e1000e_check_options - Range Checking for Command Line Parameters
222 * input. If an invalid value is given, or if no user specified
228 struct e1000_hw *hw = &adapter->hw; in e1000e_check_options()
229 int bd = adapter->bd_number; in e1000e_check_options()
232 dev_notice(&adapter->pdev->dev, in e1000e_check_options()
234 dev_notice(&adapter->pdev->dev, in e1000e_check_options()
238 /* Transmit Interrupt Delay */ in e1000e_check_options()
242 .name = "Transmit Interrupt Delay", in e1000e_check_options()
251 adapter->tx_int_delay = TxIntDelay[bd]; in e1000e_check_options()
252 e1000_validate_option(&adapter->tx_int_delay, &opt, in e1000e_check_options()
255 adapter->tx_int_delay = opt.def; in e1000e_check_options()
258 /* Transmit Absolute Interrupt Delay */ in e1000e_check_options()
262 .name = "Transmit Absolute Interrupt Delay", in e1000e_check_options()
271 adapter->tx_abs_int_delay = TxAbsIntDelay[bd]; in e1000e_check_options()
272 e1000_validate_option(&adapter->tx_abs_int_delay, &opt, in e1000e_check_options()
275 adapter->tx_abs_int_delay = opt.def; in e1000e_check_options()
278 /* Receive Interrupt Delay */ in e1000e_check_options()
282 .name = "Receive Interrupt Delay", in e1000e_check_options()
290 if (adapter->flags2 & FLAG2_DMA_BURST) in e1000e_check_options()
294 adapter->rx_int_delay = RxIntDelay[bd]; in e1000e_check_options()
295 e1000_validate_option(&adapter->rx_int_delay, &opt, in e1000e_check_options()
298 adapter->rx_int_delay = opt.def; in e1000e_check_options()
301 /* Receive Absolute Interrupt Delay */ in e1000e_check_options()
305 .name = "Receive Absolute Interrupt Delay", in e1000e_check_options()
313 if (adapter->flags2 & FLAG2_DMA_BURST) in e1000e_check_options()
317 adapter->rx_abs_int_delay = RxAbsIntDelay[bd]; in e1000e_check_options()
318 e1000_validate_option(&adapter->rx_abs_int_delay, &opt, in e1000e_check_options()
321 adapter->rx_abs_int_delay = opt.def; in e1000e_check_options()
337 adapter->itr = InterruptThrottleRate[bd]; in e1000e_check_options()
339 /* Make sure a message is printed for non-special in e1000e_check_options()
344 if ((adapter->itr > 4) && in e1000e_check_options()
345 e1000_validate_option(&adapter->itr, &opt, adapter)) in e1000e_check_options()
346 adapter->itr = opt.def; in e1000e_check_options()
351 adapter->itr = opt.def; in e1000e_check_options()
353 /* Make sure a message is printed for non-special in e1000e_check_options()
356 if (adapter->itr > 4) in e1000e_check_options()
357 dev_info(&adapter->pdev->dev, in e1000e_check_options()
359 adapter->itr); in e1000e_check_options()
362 adapter->itr_setting = adapter->itr; in e1000e_check_options()
363 switch (adapter->itr) { in e1000e_check_options()
365 dev_info(&adapter->pdev->dev, "%s turned off\n", in e1000e_check_options()
369 dev_info(&adapter->pdev->dev, in e1000e_check_options()
371 adapter->itr = 20000; in e1000e_check_options()
374 dev_info(&adapter->pdev->dev, in e1000e_check_options()
375 "%s Invalid mode - setting default\n", in e1000e_check_options()
377 adapter->itr_setting = opt.def; in e1000e_check_options()
380 dev_info(&adapter->pdev->dev, in e1000e_check_options()
383 adapter->itr = 20000; in e1000e_check_options()
386 dev_info(&adapter->pdev->dev, in e1000e_check_options()
387 "%s set to simplified (2000-8000 ints) mode\n", in e1000e_check_options()
397 adapter->itr_setting &= ~3; in e1000e_check_options()
407 .err = "defaulting to 0 (legacy)", in e1000e_check_options()
415 if (adapter->flags & FLAG_HAS_MSIX) { in e1000e_check_options()
416 opt.err = kstrdup("defaulting to 2 (MSI-X)", in e1000e_check_options()
427 dev_err(&adapter->pdev->dev, in e1000e_check_options()
437 adapter->int_mode = int_mode; in e1000e_check_options()
439 adapter->int_mode = opt.def; in e1000e_check_options()
450 .name = "PHY Smart Power Down", in e1000e_check_options()
459 if ((adapter->flags & FLAG_HAS_SMART_POWER_DOWN) && spd) in e1000e_check_options()
460 adapter->flags |= FLAG_SMART_POWER_DOWN; in e1000e_check_options()
477 adapter->flags2 |= FLAG2_CRC_STRIPPING; in e1000e_check_options()
478 adapter->flags2 |= FLAG2_DFLT_CRC_STRIPPING; in e1000e_check_options()
481 adapter->flags2 |= FLAG2_CRC_STRIPPING; in e1000e_check_options()
482 adapter->flags2 |= FLAG2_DFLT_CRC_STRIPPING; in e1000e_check_options()
502 if (hw->mac.type == e1000_ich8lan) in e1000e_check_options()
506 /* Write-protect NVM */ in e1000e_check_options()
510 .name = "Write-protect NVM", in e1000e_check_options()
515 if (adapter->flags & FLAG_IS_ICH) { in e1000e_check_options()
522 adapter->flags |= FLAG_READ_ONLY_NVM; in e1000e_check_options()
525 adapter->flags |= FLAG_READ_ONLY_NVM; in e1000e_check_options()