diff options
author | Bruce Allan <bruce.w.allan@intel.com> | 2010-05-10 11:02:12 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-13 02:31:13 -0400 |
commit | a305595b127fdbe7ab5ba458f7ee470a82a3b82c (patch) | |
tree | 3f771c91aaa998e296391a694fb29a5a2841651c /drivers/net/e1000e | |
parent | a65a4a0d51eaf9e5715dc24f8820c8689c3719a5 (diff) |
e1000e: move settting of flow control refresh timer to link setup code
The flow control refresh timer value needs to be saved off so that it can
be programmed into the approrpiate register when applicable but without a
reset, e.g. when changing flow control parameters via ethtool.
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')
-rw-r--r-- | drivers/net/e1000e/hw.h | 1 | ||||
-rw-r--r-- | drivers/net/e1000e/ich8lan.c | 2 | ||||
-rw-r--r-- | drivers/net/e1000e/netdev.c | 5 |
3 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/e1000e/hw.h b/drivers/net/e1000e/hw.h index 287ee954448f..fa314b4a68c1 100644 --- a/drivers/net/e1000e/hw.h +++ b/drivers/net/e1000e/hw.h | |||
@@ -901,6 +901,7 @@ struct e1000_fc_info { | |||
901 | u32 high_water; /* Flow control high-water mark */ | 901 | u32 high_water; /* Flow control high-water mark */ |
902 | u32 low_water; /* Flow control low-water mark */ | 902 | u32 low_water; /* Flow control low-water mark */ |
903 | u16 pause_time; /* Flow control pause timer */ | 903 | u16 pause_time; /* Flow control pause timer */ |
904 | u16 refresh_time; /* Flow control refresh timer */ | ||
904 | bool send_xon; /* Flow control send XON */ | 905 | bool send_xon; /* Flow control send XON */ |
905 | bool strict_ieee; /* Strict IEEE mode */ | 906 | bool strict_ieee; /* Strict IEEE mode */ |
906 | enum e1000_fc_mode current_mode; /* FC mode in effect */ | 907 | enum e1000_fc_mode current_mode; /* FC mode in effect */ |
diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c index 8efe9a7cbaad..2b2cffc017be 100644 --- a/drivers/net/e1000e/ich8lan.c +++ b/drivers/net/e1000e/ich8lan.c | |||
@@ -2823,6 +2823,8 @@ static s32 e1000_setup_link_ich8lan(struct e1000_hw *hw) | |||
2823 | ew32(FCTTV, hw->fc.pause_time); | 2823 | ew32(FCTTV, hw->fc.pause_time); |
2824 | if ((hw->phy.type == e1000_phy_82578) || | 2824 | if ((hw->phy.type == e1000_phy_82578) || |
2825 | (hw->phy.type == e1000_phy_82577)) { | 2825 | (hw->phy.type == e1000_phy_82577)) { |
2826 | ew32(FCRTV_PCH, hw->fc.refresh_time); | ||
2827 | |||
2826 | ret_val = hw->phy.ops.write_reg(hw, | 2828 | ret_val = hw->phy.ops.write_reg(hw, |
2827 | PHY_REG(BM_PORT_CTRL_PAGE, 27), | 2829 | PHY_REG(BM_PORT_CTRL_PAGE, 27), |
2828 | hw->fc.pause_time); | 2830 | hw->fc.pause_time); |
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index 16a03c553299..d1f60c570c0e 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c | |||
@@ -3134,6 +3134,7 @@ void e1000e_reset(struct e1000_adapter *adapter) | |||
3134 | fc->high_water = 0x5000; | 3134 | fc->high_water = 0x5000; |
3135 | fc->low_water = 0x3000; | 3135 | fc->low_water = 0x3000; |
3136 | } | 3136 | } |
3137 | fc->refresh_time = 0x1000; | ||
3137 | } else { | 3138 | } else { |
3138 | if ((adapter->flags & FLAG_HAS_ERT) && | 3139 | if ((adapter->flags & FLAG_HAS_ERT) && |
3139 | (adapter->netdev->mtu > ETH_DATA_LEN)) | 3140 | (adapter->netdev->mtu > ETH_DATA_LEN)) |
@@ -3171,10 +3172,6 @@ void e1000e_reset(struct e1000_adapter *adapter) | |||
3171 | if (mac->ops.init_hw(hw)) | 3172 | if (mac->ops.init_hw(hw)) |
3172 | e_err("Hardware Error\n"); | 3173 | e_err("Hardware Error\n"); |
3173 | 3174 | ||
3174 | /* additional part of the flow-control workaround above */ | ||
3175 | if (hw->mac.type == e1000_pchlan) | ||
3176 | ew32(FCRTV_PCH, 0x1000); | ||
3177 | |||
3178 | e1000_update_mng_vlan(adapter); | 3175 | e1000_update_mng_vlan(adapter); |
3179 | 3176 | ||
3180 | /* Enable h/w to recognize an 802.1Q VLAN Ethernet packet */ | 3177 | /* Enable h/w to recognize an 802.1Q VLAN Ethernet packet */ |