aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000e/lib.c
diff options
context:
space:
mode:
authorBruce Allan <bruce.w.allan@intel.com>2010-01-07 11:31:35 -0500
committerDavid S. Miller <davem@davemloft.net>2010-01-08 03:35:30 -0500
commitf464ba87fe7f346e270239354eb0d38f7a3b3e6b (patch)
tree0772d25c99b76181496ebd496ade3b17d29d507b /drivers/net/e1000e/lib.c
parent29477e249f5a28444c556bbb816f3af2b6f84412 (diff)
e1000e: perform 10/100 adaptive IFS only on parts that support it
Adaptive IFS which involves writing to the Adaptive IFS Throttle register was being done for all devices supported by the driver even though it is not supported (i.e. the register doesn't even exist) on some devices. The feature is supported on 8257x/82583 and ICH/PCH based devices, but not on ESB2. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/e1000e/lib.c')
-rw-r--r--drivers/net/e1000e/lib.c14
1 files changed, 14 insertions, 0 deletions
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/**