aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Brandeburg <jesse.brandeburg@intel.com>2008-08-26 07:27:10 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-09-03 10:03:33 -0400
commit2b9ade935cd2be6db26f5445656950bc3da7055d (patch)
tree10c9a842f0940d1d38f3475691b3e72d3a892b2f
parent3a581073e0f9f3966ac95a89cd04a0a6b948dc77 (diff)
ixgbe: disable flow control by default
Since the adapter cannot tell what the remote end's flow control capability is through auto-neg, we must turn off flow control by default. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
-rw-r--r--drivers/net/ixgbe/ixgbe.h6
-rw-r--r--drivers/net/ixgbe/ixgbe_common.c17
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c15
3 files changed, 26 insertions, 12 deletions
diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h
index 956914a5028d..496a91aea63c 100644
--- a/drivers/net/ixgbe/ixgbe.h
+++ b/drivers/net/ixgbe/ixgbe.h
@@ -69,12 +69,12 @@
69 69
70/* flow control */ 70/* flow control */
71#define IXGBE_DEFAULT_FCRTL 0x10000 71#define IXGBE_DEFAULT_FCRTL 0x10000
72#define IXGBE_MIN_FCRTL 0 72#define IXGBE_MIN_FCRTL 0x40
73#define IXGBE_MAX_FCRTL 0x7FF80 73#define IXGBE_MAX_FCRTL 0x7FF80
74#define IXGBE_DEFAULT_FCRTH 0x20000 74#define IXGBE_DEFAULT_FCRTH 0x20000
75#define IXGBE_MIN_FCRTH 0 75#define IXGBE_MIN_FCRTH 0x600
76#define IXGBE_MAX_FCRTH 0x7FFF0 76#define IXGBE_MAX_FCRTH 0x7FFF0
77#define IXGBE_DEFAULT_FCPAUSE 0x6800 /* may be too long */ 77#define IXGBE_DEFAULT_FCPAUSE 0xFFFF
78#define IXGBE_MIN_FCPAUSE 0 78#define IXGBE_MIN_FCPAUSE 0
79#define IXGBE_MAX_FCPAUSE 0xFFFF 79#define IXGBE_MAX_FCPAUSE 0xFFFF
80 80
diff --git a/drivers/net/ixgbe/ixgbe_common.c b/drivers/net/ixgbe/ixgbe_common.c
index a9f4d0e58e1c..9c0d0a1964eb 100644
--- a/drivers/net/ixgbe/ixgbe_common.c
+++ b/drivers/net/ixgbe/ixgbe_common.c
@@ -1065,6 +1065,13 @@ s32 ixgbe_setup_fc(struct ixgbe_hw *hw, s32 packetbuf_num)
1065 rmcs_reg &= ~(IXGBE_RMCS_TFCE_PRIORITY | IXGBE_RMCS_TFCE_802_3X); 1065 rmcs_reg &= ~(IXGBE_RMCS_TFCE_PRIORITY | IXGBE_RMCS_TFCE_802_3X);
1066 1066
1067 /* 1067 /*
1068 * 10 gig parts do not have a word in the EEPROM to determine the
1069 * default flow control setting, so we explicitly set it to full.
1070 */
1071 if (hw->fc.type == ixgbe_fc_default)
1072 hw->fc.type = ixgbe_fc_full;
1073
1074 /*
1068 * We want to save off the original Flow Control configuration just in 1075 * We want to save off the original Flow Control configuration just in
1069 * case we get disconnected and then reconnected into a different hub 1076 * case we get disconnected and then reconnected into a different hub
1070 * or switch with different Flow Control capabilities. 1077 * or switch with different Flow Control capabilities.
@@ -1117,6 +1124,16 @@ s32 ixgbe_setup_fc(struct ixgbe_hw *hw, s32 packetbuf_num)
1117 IXGBE_WRITE_REG(hw, IXGBE_RMCS, rmcs_reg); 1124 IXGBE_WRITE_REG(hw, IXGBE_RMCS, rmcs_reg);
1118 1125
1119 /* 1126 /*
1127 * Check for invalid software configuration, zeros are completely
1128 * invalid for all parameters used past this point, and if we enable
1129 * flow control with zero water marks, we blast flow control packets.
1130 */
1131 if (!hw->fc.low_water || !hw->fc.high_water || !hw->fc.pause_time) {
1132 hw_dbg(hw, "Flow control structure initialized incorrectly\n");
1133 return IXGBE_ERR_INVALID_LINK_SETTINGS;
1134 }
1135
1136 /*
1120 * We need to set up the Receive Threshold high and low water 1137 * We need to set up the Receive Threshold high and low water
1121 * marks as well as (optionally) enabling the transmission of 1138 * marks as well as (optionally) enabling the transmission of
1122 * XON frames. 1139 * XON frames.
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index b5a9b9da2fb7..cba7a38bf6bb 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -2446,8 +2446,12 @@ static int __devinit ixgbe_sw_init(struct ixgbe_adapter *adapter)
2446 adapter->tx_eitr = 1; 2446 adapter->tx_eitr = 1;
2447 2447
2448 /* default flow control settings */ 2448 /* default flow control settings */
2449 hw->fc.original_type = ixgbe_fc_full; 2449 hw->fc.original_type = ixgbe_fc_none;
2450 hw->fc.type = ixgbe_fc_full; 2450 hw->fc.type = ixgbe_fc_none;
2451 hw->fc.high_water = IXGBE_DEFAULT_FCRTH;
2452 hw->fc.low_water = IXGBE_DEFAULT_FCRTL;
2453 hw->fc.pause_time = IXGBE_DEFAULT_FCPAUSE;
2454 hw->fc.send_xon = true;
2451 2455
2452 /* select 10G link by default */ 2456 /* select 10G link by default */
2453 hw->mac.link_mode_select = IXGBE_AUTOC_LMS_10G_LINK_NO_AN; 2457 hw->mac.link_mode_select = IXGBE_AUTOC_LMS_10G_LINK_NO_AN;
@@ -3587,13 +3591,6 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
3587 3591
3588 INIT_WORK(&adapter->reset_task, ixgbe_reset_task); 3592 INIT_WORK(&adapter->reset_task, ixgbe_reset_task);
3589 3593
3590 /* initialize default flow control settings */
3591 hw->fc.original_type = ixgbe_fc_full;
3592 hw->fc.type = ixgbe_fc_full;
3593 hw->fc.high_water = IXGBE_DEFAULT_FCRTH;
3594 hw->fc.low_water = IXGBE_DEFAULT_FCRTL;
3595 hw->fc.pause_time = IXGBE_DEFAULT_FCPAUSE;
3596
3597 err = ixgbe_init_interrupt_scheme(adapter); 3594 err = ixgbe_init_interrupt_scheme(adapter);
3598 if (err) 3595 if (err)
3599 goto err_sw_init; 3596 goto err_sw_init;