Lines Matching +full:flow +full:- +full:control

1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright(c) 1999 - 2008 Intel Corporation. */
14 #define OPTION_UNSET -1
33 * Valid Range: 64-4096
42 * Valid Range: 64-4096
49 /* User Specified Flow Control Override
51 * Valid Range: 0-3
52 * - 0 - No Flow Control
53 * - 1 - Rx only, respond to PAUSE frames but do not generate them
54 * - 2 - Tx only, generate PAUSE frames but ignore them on receive
55 * - 3 - Full Flow Control Support
57 * Default Value: 2 - Tx only (silicon bug avoidance)
60 IXGB_PARAM(FlowControl, "Flow Control setting");
62 /* XsumRX - Receive Checksum Offload Enable/Disable
65 * - 0 - disables all checksum offload
66 * - 1 - enables receive IP/TCP/UDP checksum offload
76 * Valid Range: 0-65535
85 * Valid Range: 0-65535
92 /* Receive Flow control high threshold (when we send a pause frame)
95 * Valid Range: 1,536 - 262,136 (0x600 - 0x3FFF8, 8 byte granularity)
100 IXGB_PARAM(RxFCHighThresh, "Receive Flow Control High Threshold");
102 /* Receive Flow control low threshold (when we send a resume frame)
105 * Valid Range: 64 - 262,136 (0x40 - 0x3FFF8, 8 byte granularity)
111 IXGB_PARAM(RxFCLowThresh, "Receive Flow Control Low Threshold");
113 /* Flow control request timeout (how long to pause the link partner's tx)
116 * Valid Range: 1 - 65535
121 IXGB_PARAM(FCReqTimeout, "Flow Control Request Timeout");
127 * - 0 - disables transmit interrupt delay
128 * - 1 - enables transmmit interrupt delay
179 *value = opt->def; in ixgb_validate_option()
183 switch (opt->type) { in ixgb_validate_option()
187 pr_info("%s Enabled\n", opt->name); in ixgb_validate_option()
190 pr_info("%s Disabled\n", opt->name); in ixgb_validate_option()
195 if (*value >= opt->arg.r.min && *value <= opt->arg.r.max) { in ixgb_validate_option()
196 pr_info("%s set to %i\n", opt->name, *value); in ixgb_validate_option()
204 for (i = 0; i < opt->arg.l.nr; i++) { in ixgb_validate_option()
205 ent = &opt->arg.l.p[i]; in ixgb_validate_option()
206 if (*value == ent->i) { in ixgb_validate_option()
207 if (ent->str[0] != '\0') in ixgb_validate_option()
208 pr_info("%s\n", ent->str); in ixgb_validate_option()
218 pr_info("Invalid %s specified (%i) %s\n", opt->name, *value, opt->err); in ixgb_validate_option()
219 *value = opt->def; in ixgb_validate_option()
220 return -1; in ixgb_validate_option()
224 * ixgb_check_options - Range Checking for Command Line Parameters
236 int bd = adapter->bd_number; in ixgb_check_options()
251 struct ixgb_desc_ring *tx_ring = &adapter->tx_ring; in ixgb_check_options()
254 tx_ring->count = TxDescriptors[bd]; in ixgb_check_options()
255 ixgb_validate_option(&tx_ring->count, &opt); in ixgb_check_options()
257 tx_ring->count = opt.def; in ixgb_check_options()
259 tx_ring->count = ALIGN(tx_ring->count, IXGB_REQ_TX_DESCRIPTOR_MULTIPLE); in ixgb_check_options()
270 struct ixgb_desc_ring *rx_ring = &adapter->rx_ring; in ixgb_check_options()
273 rx_ring->count = RxDescriptors[bd]; in ixgb_check_options()
274 ixgb_validate_option(&rx_ring->count, &opt); in ixgb_check_options()
276 rx_ring->count = opt.def; in ixgb_check_options()
278 rx_ring->count = ALIGN(rx_ring->count, IXGB_REQ_RX_DESCRIPTOR_MULTIPLE); in ixgb_check_options()
291 adapter->rx_csum = rx_csum; in ixgb_check_options()
293 adapter->rx_csum = opt.def; in ixgb_check_options()
296 { /* Flow Control */ in ixgb_check_options()
299 { ixgb_fc_none, "Flow Control Disabled" }, in ixgb_check_options()
300 { ixgb_fc_rx_pause, "Flow Control Receive Only" }, in ixgb_check_options()
301 { ixgb_fc_tx_pause, "Flow Control Transmit Only" }, in ixgb_check_options()
302 { ixgb_fc_full, "Flow Control Enabled" }, in ixgb_check_options()
303 { ixgb_fc_default, "Flow Control Hardware Default" } in ixgb_check_options()
308 .name = "Flow Control", in ixgb_check_options()
318 adapter->hw.fc.type = fc; in ixgb_check_options()
320 adapter->hw.fc.type = opt.def; in ixgb_check_options()
323 { /* Receive Flow Control High Threshold */ in ixgb_check_options()
326 .name = "Rx Flow Control High Threshold", in ixgb_check_options()
334 adapter->hw.fc.high_water = RxFCHighThresh[bd]; in ixgb_check_options()
335 ixgb_validate_option(&adapter->hw.fc.high_water, &opt); in ixgb_check_options()
337 adapter->hw.fc.high_water = opt.def; in ixgb_check_options()
339 if (!(adapter->hw.fc.type & ixgb_fc_tx_pause) ) in ixgb_check_options()
342 { /* Receive Flow Control Low Threshold */ in ixgb_check_options()
345 .name = "Rx Flow Control Low Threshold", in ixgb_check_options()
353 adapter->hw.fc.low_water = RxFCLowThresh[bd]; in ixgb_check_options()
354 ixgb_validate_option(&adapter->hw.fc.low_water, &opt); in ixgb_check_options()
356 adapter->hw.fc.low_water = opt.def; in ixgb_check_options()
358 if (!(adapter->hw.fc.type & ixgb_fc_tx_pause) ) in ixgb_check_options()
361 { /* Flow Control Pause Time Request*/ in ixgb_check_options()
364 .name = "Flow Control Pause Time Request", in ixgb_check_options()
374 adapter->hw.fc.pause_time = pause_time; in ixgb_check_options()
376 adapter->hw.fc.pause_time = opt.def; in ixgb_check_options()
378 if (!(adapter->hw.fc.type & ixgb_fc_tx_pause) ) in ixgb_check_options()
381 /* high low and spacing check for rx flow control thresholds */ in ixgb_check_options()
382 if (adapter->hw.fc.type & ixgb_fc_tx_pause) { in ixgb_check_options()
384 if (adapter->hw.fc.high_water < (adapter->hw.fc.low_water + 8)) { in ixgb_check_options()
387 adapter->hw.fc.high_water = DEFAULT_FCRTH; in ixgb_check_options()
388 adapter->hw.fc.low_water = DEFAULT_FCRTL; in ixgb_check_options()
402 adapter->rx_int_delay = RxIntDelay[bd]; in ixgb_check_options()
403 ixgb_validate_option(&adapter->rx_int_delay, &opt); in ixgb_check_options()
405 adapter->rx_int_delay = opt.def; in ixgb_check_options()
419 adapter->tx_int_delay = TxIntDelay[bd]; in ixgb_check_options()
420 ixgb_validate_option(&adapter->tx_int_delay, &opt); in ixgb_check_options()
422 adapter->tx_int_delay = opt.def; in ixgb_check_options()
437 adapter->tx_int_delay_enable = ide; in ixgb_check_options()
439 adapter->tx_int_delay_enable = opt.def; in ixgb_check_options()