aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/e1000e/82571.c2
-rw-r--r--drivers/net/e1000e/es2lan.c2
-rw-r--r--drivers/net/e1000e/hw.h1
-rw-r--r--drivers/net/e1000e/ich8lan.c2
-rw-r--r--drivers/net/e1000e/lib.c14
5 files changed, 21 insertions, 0 deletions
diff --git a/drivers/net/e1000e/82571.c b/drivers/net/e1000e/82571.c
index b979464091bb..02d67d047d96 100644
--- a/drivers/net/e1000e/82571.c
+++ b/drivers/net/e1000e/82571.c
@@ -237,6 +237,8 @@ static s32 e1000_init_mac_params_82571(struct e1000_adapter *adapter)
237 /* Set if manageability features are enabled. */ 237 /* Set if manageability features are enabled. */
238 mac->arc_subsystem_valid = (er32(FWSM) & E1000_FWSM_MODE_MASK) 238 mac->arc_subsystem_valid = (er32(FWSM) & E1000_FWSM_MODE_MASK)
239 ? true : false; 239 ? true : false;
240 /* Adaptive IFS supported */
241 mac->adaptive_ifs = true;
240 242
241 /* check for link */ 243 /* check for link */
242 switch (hw->phy.media_type) { 244 switch (hw->phy.media_type) {
diff --git a/drivers/net/e1000e/es2lan.c b/drivers/net/e1000e/es2lan.c
index 3028f23da891..e2aa3b788564 100644
--- a/drivers/net/e1000e/es2lan.c
+++ b/drivers/net/e1000e/es2lan.c
@@ -224,6 +224,8 @@ static s32 e1000_init_mac_params_80003es2lan(struct e1000_adapter *adapter)
224 /* Set if manageability features are enabled. */ 224 /* Set if manageability features are enabled. */
225 mac->arc_subsystem_valid = (er32(FWSM) & E1000_FWSM_MODE_MASK) 225 mac->arc_subsystem_valid = (er32(FWSM) & E1000_FWSM_MODE_MASK)
226 ? true : false; 226 ? true : false;
227 /* Adaptive IFS not supported */
228 mac->adaptive_ifs = false;
227 229
228 /* check for link */ 230 /* check for link */
229 switch (hw->phy.media_type) { 231 switch (hw->phy.media_type) {
diff --git a/drivers/net/e1000e/hw.h b/drivers/net/e1000e/hw.h
index 2784cf44a6f3..eccf29b75c41 100644
--- a/drivers/net/e1000e/hw.h
+++ b/drivers/net/e1000e/hw.h
@@ -818,6 +818,7 @@ struct e1000_mac_info {
818 818
819 u8 forced_speed_duplex; 819 u8 forced_speed_duplex;
820 820
821 bool adaptive_ifs;
821 bool arc_subsystem_valid; 822 bool arc_subsystem_valid;
822 bool autoneg; 823 bool autoneg;
823 bool autoneg_failed; 824 bool autoneg_failed;
diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c
index 9b09246af064..ad08cf3f40c0 100644
--- a/drivers/net/e1000e/ich8lan.c
+++ b/drivers/net/e1000e/ich8lan.c
@@ -454,6 +454,8 @@ static s32 e1000_init_mac_params_ich8lan(struct e1000_adapter *adapter)
454 mac->rar_entry_count--; 454 mac->rar_entry_count--;
455 /* Set if manageability features are enabled. */ 455 /* Set if manageability features are enabled. */
456 mac->arc_subsystem_valid = true; 456 mac->arc_subsystem_valid = true;
457 /* Adaptive IFS supported */
458 mac->adaptive_ifs = true;
457 459
458 /* LED operations */ 460 /* LED operations */
459 switch (mac->type) { 461 switch (mac->type) {
diff --git a/drivers/net/e1000e/lib.c b/drivers/net/e1000e/lib.c
index a86c17548c1e..56b59e4a6871 100644
--- a/drivers/net/e1000e/lib.c
+++ b/drivers/net/e1000e/lib.c
@@ -1609,6 +1609,11 @@ void e1000e_reset_adaptive(struct e1000_hw *hw)
1609{ 1609{
1610 struct e1000_mac_info *mac = &hw->mac; 1610 struct e1000_mac_info *mac = &hw->mac;
1611 1611
1612 if (!mac->adaptive_ifs) {
1613 e_dbg("Not in Adaptive IFS mode!\n");
1614 goto out;
1615 }
1616
1612 mac->current_ifs_val = 0; 1617 mac->current_ifs_val = 0;
1613 mac->ifs_min_val = IFS_MIN; 1618 mac->ifs_min_val = IFS_MIN;
1614 mac->ifs_max_val = IFS_MAX; 1619 mac->ifs_max_val = IFS_MAX;
@@ -1617,6 +1622,8 @@ void e1000e_reset_adaptive(struct e1000_hw *hw)
1617 1622
1618 mac->in_ifs_mode = false; 1623 mac->in_ifs_mode = false;
1619 ew32(AIT, 0); 1624 ew32(AIT, 0);
1625out:
1626 return;
1620} 1627}
1621 1628
1622/** 1629/**
@@ -1630,6 +1637,11 @@ void e1000e_update_adaptive(struct e1000_hw *hw)
1630{ 1637{
1631 struct e1000_mac_info *mac = &hw->mac; 1638 struct e1000_mac_info *mac = &hw->mac;
1632 1639
1640 if (!mac->adaptive_ifs) {
1641 e_dbg("Not in Adaptive IFS mode!\n");
1642 goto out;
1643 }
1644
1633 if ((mac->collision_delta * mac->ifs_ratio) > mac->tx_packet_delta) { 1645 if ((mac->collision_delta * mac->ifs_ratio) > mac->tx_packet_delta) {
1634 if (mac->tx_packet_delta > MIN_NUM_XMITS) { 1646 if (mac->tx_packet_delta > MIN_NUM_XMITS) {
1635 mac->in_ifs_mode = true; 1647 mac->in_ifs_mode = true;
@@ -1650,6 +1662,8 @@ void e1000e_update_adaptive(struct e1000_hw *hw)
1650 ew32(AIT, 0); 1662 ew32(AIT, 0);
1651 } 1663 }
1652 } 1664 }
1665out:
1666 return;
1653} 1667}
1654 1668
1655/** 1669/**