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
181 *value = opt->def; in ixgb_validate_option()
185 switch (opt->type) { in ixgb_validate_option()
189 pr_info("%s Enabled\n", opt->name); in ixgb_validate_option()
192 pr_info("%s Disabled\n", opt->name); in ixgb_validate_option()
197 if (*value >= opt->arg.r.min && *value <= opt->arg.r.max) { in ixgb_validate_option()
198 pr_info("%s set to %i\n", opt->name, *value); in ixgb_validate_option()
206 for (i = 0; i < opt->arg.l.nr; i++) { in ixgb_validate_option()
207 ent = &opt->arg.l.p[i]; in ixgb_validate_option()
208 if (*value == ent->i) { in ixgb_validate_option()
209 if (ent->str[0] != '\0') in ixgb_validate_option()
210 pr_info("%s\n", ent->str); in ixgb_validate_option()
220 pr_info("Invalid %s specified (%i) %s\n", opt->name, *value, opt->err); in ixgb_validate_option()
221 *value = opt->def; in ixgb_validate_option()
222 return -1; in ixgb_validate_option()
226 * ixgb_check_options - Range Checking for Command Line Parameters
238 int bd = adapter->bd_number; in ixgb_check_options()
253 struct ixgb_desc_ring *tx_ring = &adapter->tx_ring; in ixgb_check_options()
256 tx_ring->count = TxDescriptors[bd]; in ixgb_check_options()
257 ixgb_validate_option(&tx_ring->count, &opt); in ixgb_check_options()
259 tx_ring->count = opt.def; in ixgb_check_options()
261 tx_ring->count = ALIGN(tx_ring->count, IXGB_REQ_TX_DESCRIPTOR_MULTIPLE); in ixgb_check_options()
272 struct ixgb_desc_ring *rx_ring = &adapter->rx_ring; in ixgb_check_options()
275 rx_ring->count = RxDescriptors[bd]; in ixgb_check_options()
276 ixgb_validate_option(&rx_ring->count, &opt); in ixgb_check_options()
278 rx_ring->count = opt.def; in ixgb_check_options()
280 rx_ring->count = ALIGN(rx_ring->count, IXGB_REQ_RX_DESCRIPTOR_MULTIPLE); in ixgb_check_options()
293 adapter->rx_csum = rx_csum; in ixgb_check_options()
295 adapter->rx_csum = opt.def; in ixgb_check_options()
298 { /* Flow Control */ in ixgb_check_options()
301 { ixgb_fc_none, "Flow Control Disabled" }, in ixgb_check_options()
302 { ixgb_fc_rx_pause, "Flow Control Receive Only" }, in ixgb_check_options()
303 { ixgb_fc_tx_pause, "Flow Control Transmit Only" }, in ixgb_check_options()
304 { ixgb_fc_full, "Flow Control Enabled" }, in ixgb_check_options()
305 { ixgb_fc_default, "Flow Control Hardware Default" } in ixgb_check_options()
310 .name = "Flow Control", in ixgb_check_options()
320 adapter->hw.fc.type = fc; in ixgb_check_options()
322 adapter->hw.fc.type = opt.def; in ixgb_check_options()
325 { /* Receive Flow Control High Threshold */ in ixgb_check_options()
328 .name = "Rx Flow Control High Threshold", in ixgb_check_options()
336 adapter->hw.fc.high_water = RxFCHighThresh[bd]; in ixgb_check_options()
337 ixgb_validate_option(&adapter->hw.fc.high_water, &opt); in ixgb_check_options()
339 adapter->hw.fc.high_water = opt.def; in ixgb_check_options()
341 if (!(adapter->hw.fc.type & ixgb_fc_tx_pause) ) in ixgb_check_options()
344 { /* Receive Flow Control Low Threshold */ in ixgb_check_options()
347 .name = "Rx Flow Control Low Threshold", in ixgb_check_options()
355 adapter->hw.fc.low_water = RxFCLowThresh[bd]; in ixgb_check_options()
356 ixgb_validate_option(&adapter->hw.fc.low_water, &opt); in ixgb_check_options()
358 adapter->hw.fc.low_water = opt.def; in ixgb_check_options()
360 if (!(adapter->hw.fc.type & ixgb_fc_tx_pause) ) in ixgb_check_options()
363 { /* Flow Control Pause Time Request*/ in ixgb_check_options()
366 .name = "Flow Control Pause Time Request", in ixgb_check_options()
376 adapter->hw.fc.pause_time = pause_time; in ixgb_check_options()
378 adapter->hw.fc.pause_time = opt.def; in ixgb_check_options()
380 if (!(adapter->hw.fc.type & ixgb_fc_tx_pause) ) in ixgb_check_options()
383 /* high low and spacing check for rx flow control thresholds */ in ixgb_check_options()
384 if (adapter->hw.fc.type & ixgb_fc_tx_pause) { in ixgb_check_options()
386 if (adapter->hw.fc.high_water < (adapter->hw.fc.low_water + 8)) { in ixgb_check_options()
389 adapter->hw.fc.high_water = DEFAULT_FCRTH; in ixgb_check_options()
390 adapter->hw.fc.low_water = DEFAULT_FCRTL; in ixgb_check_options()
404 adapter->rx_int_delay = RxIntDelay[bd]; in ixgb_check_options()
405 ixgb_validate_option(&adapter->rx_int_delay, &opt); in ixgb_check_options()
407 adapter->rx_int_delay = opt.def; in ixgb_check_options()
421 adapter->tx_int_delay = TxIntDelay[bd]; in ixgb_check_options()
422 ixgb_validate_option(&adapter->tx_int_delay, &opt); in ixgb_check_options()
424 adapter->tx_int_delay = opt.def; in ixgb_check_options()
439 adapter->tx_int_delay_enable = ide; in ixgb_check_options()
441 adapter->tx_int_delay_enable = opt.def; in ixgb_check_options()