diff options
author | Auke Kok <auke-jan.h.kok@intel.com> | 2006-05-23 13:29:50 -0400 |
---|---|---|
committer | Auke Kok <juke-jan.h.kok@intel.com> | 2006-05-23 13:29:50 -0400 |
commit | 953784d66d8f621a8684d007e526ca26b12d54a1 (patch) | |
tree | 2bc2564e76b842e37d2a7d87e001fba6c38ecb4f /drivers/net/ixgb | |
parent | 4de17c8c7295d32d4e112e214aa90d8f7006972f (diff) |
ixgb: fix flow control
Make default flow control only have *sending* of flow control packets
enabled, and fix to disable / enable flow control correctly. Set flow
control defaults to disable receiving flow control from the link
partner, to fix the transmit fifo overlow errata
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Diffstat (limited to 'drivers/net/ixgb')
-rw-r--r-- | drivers/net/ixgb/ixgb_param.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/drivers/net/ixgb/ixgb_param.c b/drivers/net/ixgb/ixgb_param.c index 8a83dfdf746d..388462cca39d 100644 --- a/drivers/net/ixgb/ixgb_param.c +++ b/drivers/net/ixgb/ixgb_param.c | |||
@@ -76,7 +76,7 @@ IXGB_PARAM(RxDescriptors, "Number of receive descriptors"); | |||
76 | * - 2 - Tx only, generate PAUSE frames but ignore them on receive | 76 | * - 2 - Tx only, generate PAUSE frames but ignore them on receive |
77 | * - 3 - Full Flow Control Support | 77 | * - 3 - Full Flow Control Support |
78 | * | 78 | * |
79 | * Default Value: Read flow control settings from the EEPROM | 79 | * Default Value: 2 - Tx only (silicon bug avoidance) |
80 | */ | 80 | */ |
81 | 81 | ||
82 | IXGB_PARAM(FlowControl, "Flow Control setting"); | 82 | IXGB_PARAM(FlowControl, "Flow Control setting"); |
@@ -137,7 +137,7 @@ IXGB_PARAM(RxFCLowThresh, "Receive Flow Control Low Threshold"); | |||
137 | * | 137 | * |
138 | * Valid Range: 1 - 65535 | 138 | * Valid Range: 1 - 65535 |
139 | * | 139 | * |
140 | * Default Value: 256 (0x100) | 140 | * Default Value: 65535 (0xffff) (we'll send an xon if we recover) |
141 | */ | 141 | */ |
142 | 142 | ||
143 | IXGB_PARAM(FCReqTimeout, "Flow Control Request Timeout"); | 143 | IXGB_PARAM(FCReqTimeout, "Flow Control Request Timeout"); |
@@ -165,8 +165,6 @@ IXGB_PARAM(IntDelayEnable, "Transmit Interrupt Delay Enable"); | |||
165 | 165 | ||
166 | #define XSUMRX_DEFAULT OPTION_ENABLED | 166 | #define XSUMRX_DEFAULT OPTION_ENABLED |
167 | 167 | ||
168 | #define FLOW_CONTROL_FULL ixgb_fc_full | ||
169 | #define FLOW_CONTROL_DEFAULT FLOW_CONTROL_FULL | ||
170 | #define DEFAULT_FCRTL 0x28000 | 168 | #define DEFAULT_FCRTL 0x28000 |
171 | #define DEFAULT_FCRTH 0x30000 | 169 | #define DEFAULT_FCRTH 0x30000 |
172 | #define MIN_FCRTL 0 | 170 | #define MIN_FCRTL 0 |
@@ -174,9 +172,9 @@ IXGB_PARAM(IntDelayEnable, "Transmit Interrupt Delay Enable"); | |||
174 | #define MIN_FCRTH 8 | 172 | #define MIN_FCRTH 8 |
175 | #define MAX_FCRTH 0x3FFF0 | 173 | #define MAX_FCRTH 0x3FFF0 |
176 | 174 | ||
177 | #define DEFAULT_FCPAUSE 0x100 /* this may be too long */ | ||
178 | #define MIN_FCPAUSE 1 | 175 | #define MIN_FCPAUSE 1 |
179 | #define MAX_FCPAUSE 0xffff | 176 | #define MAX_FCPAUSE 0xffff |
177 | #define DEFAULT_FCPAUSE 0xFFFF /* this may be too long */ | ||
180 | 178 | ||
181 | struct ixgb_option { | 179 | struct ixgb_option { |
182 | enum { enable_option, range_option, list_option } type; | 180 | enum { enable_option, range_option, list_option } type; |
@@ -336,7 +334,7 @@ ixgb_check_options(struct ixgb_adapter *adapter) | |||
336 | .type = list_option, | 334 | .type = list_option, |
337 | .name = "Flow Control", | 335 | .name = "Flow Control", |
338 | .err = "reading default settings from EEPROM", | 336 | .err = "reading default settings from EEPROM", |
339 | .def = ixgb_fc_full, | 337 | .def = ixgb_fc_tx_pause, |
340 | .arg = { .l = { .nr = LIST_LEN(fc_list), | 338 | .arg = { .l = { .nr = LIST_LEN(fc_list), |
341 | .p = fc_list }} | 339 | .p = fc_list }} |
342 | }; | 340 | }; |
@@ -365,8 +363,8 @@ ixgb_check_options(struct ixgb_adapter *adapter) | |||
365 | } else { | 363 | } else { |
366 | adapter->hw.fc.high_water = opt.def; | 364 | adapter->hw.fc.high_water = opt.def; |
367 | } | 365 | } |
368 | if(!(adapter->hw.fc.type & ixgb_fc_rx_pause) ) | 366 | if (!(adapter->hw.fc.type & ixgb_fc_tx_pause) ) |
369 | printk (KERN_INFO | 367 | printk (KERN_INFO |
370 | "Ignoring RxFCHighThresh when no RxFC\n"); | 368 | "Ignoring RxFCHighThresh when no RxFC\n"); |
371 | } | 369 | } |
372 | { /* Receive Flow Control Low Threshold */ | 370 | { /* Receive Flow Control Low Threshold */ |
@@ -385,8 +383,8 @@ ixgb_check_options(struct ixgb_adapter *adapter) | |||
385 | } else { | 383 | } else { |
386 | adapter->hw.fc.low_water = opt.def; | 384 | adapter->hw.fc.low_water = opt.def; |
387 | } | 385 | } |
388 | if(!(adapter->hw.fc.type & ixgb_fc_rx_pause) ) | 386 | if (!(adapter->hw.fc.type & ixgb_fc_tx_pause) ) |
389 | printk (KERN_INFO | 387 | printk (KERN_INFO |
390 | "Ignoring RxFCLowThresh when no RxFC\n"); | 388 | "Ignoring RxFCLowThresh when no RxFC\n"); |
391 | } | 389 | } |
392 | { /* Flow Control Pause Time Request*/ | 390 | { /* Flow Control Pause Time Request*/ |
@@ -406,12 +404,12 @@ ixgb_check_options(struct ixgb_adapter *adapter) | |||
406 | } else { | 404 | } else { |
407 | adapter->hw.fc.pause_time = opt.def; | 405 | adapter->hw.fc.pause_time = opt.def; |
408 | } | 406 | } |
409 | if(!(adapter->hw.fc.type & ixgb_fc_rx_pause) ) | 407 | if (!(adapter->hw.fc.type & ixgb_fc_tx_pause) ) |
410 | printk (KERN_INFO | 408 | printk (KERN_INFO |
411 | "Ignoring FCReqTimeout when no RxFC\n"); | 409 | "Ignoring FCReqTimeout when no RxFC\n"); |
412 | } | 410 | } |
413 | /* high low and spacing check for rx flow control thresholds */ | 411 | /* high low and spacing check for rx flow control thresholds */ |
414 | if (adapter->hw.fc.type & ixgb_fc_rx_pause) { | 412 | if (adapter->hw.fc.type & ixgb_fc_tx_pause) { |
415 | /* high must be greater than low */ | 413 | /* high must be greater than low */ |
416 | if (adapter->hw.fc.high_water < (adapter->hw.fc.low_water + 8)) { | 414 | if (adapter->hw.fc.high_water < (adapter->hw.fc.low_water + 8)) { |
417 | /* set defaults */ | 415 | /* set defaults */ |