aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000e/es2lan.c
diff options
context:
space:
mode:
authorJeff Kirsher <jeffrey.t.kirsher@intel.com>2008-03-28 12:15:16 -0400
committerJeff Garzik <jeff@garzik.org>2008-03-28 22:15:00 -0400
commit318a94d68979cbe9cc98a3050b4b7be2f08513c8 (patch)
tree32fdd0bd9f4a0c9dcc2a958b18820286a9acdcec /drivers/net/e1000e/es2lan.c
parente2de3eb69c40c01739ce9b154c65e51d94d72966 (diff)
e1000e: reorganize PHY and flow control interface
This reorganization moves the PHY status into a separate struct. Flow Control setup is moved into this struct as well and frame size away from here into the adapter struct where its inly use is. The post-link-up code is now a separate function and moved out of the watchdog function itself. This allows us to track the es2lan restart issue a bit easier. Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/e1000e/es2lan.c')
-rw-r--r--drivers/net/e1000e/es2lan.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/e1000e/es2lan.c b/drivers/net/e1000e/es2lan.c
index df2782473910..e3f4aeefeae2 100644
--- a/drivers/net/e1000e/es2lan.c
+++ b/drivers/net/e1000e/es2lan.c
@@ -119,7 +119,7 @@ static s32 e1000_init_phy_params_80003es2lan(struct e1000_hw *hw)
119 struct e1000_phy_info *phy = &hw->phy; 119 struct e1000_phy_info *phy = &hw->phy;
120 s32 ret_val; 120 s32 ret_val;
121 121
122 if (hw->media_type != e1000_media_type_copper) { 122 if (hw->phy.media_type != e1000_media_type_copper) {
123 phy->type = e1000_phy_none; 123 phy->type = e1000_phy_none;
124 return 0; 124 return 0;
125 } 125 }
@@ -198,10 +198,10 @@ static s32 e1000_init_mac_params_80003es2lan(struct e1000_adapter *adapter)
198 /* Set media type */ 198 /* Set media type */
199 switch (adapter->pdev->device) { 199 switch (adapter->pdev->device) {
200 case E1000_DEV_ID_80003ES2LAN_SERDES_DPT: 200 case E1000_DEV_ID_80003ES2LAN_SERDES_DPT:
201 hw->media_type = e1000_media_type_internal_serdes; 201 hw->phy.media_type = e1000_media_type_internal_serdes;
202 break; 202 break;
203 default: 203 default:
204 hw->media_type = e1000_media_type_copper; 204 hw->phy.media_type = e1000_media_type_copper;
205 break; 205 break;
206 } 206 }
207 207
@@ -213,7 +213,7 @@ static s32 e1000_init_mac_params_80003es2lan(struct e1000_adapter *adapter)
213 mac->arc_subsystem_valid = (er32(FWSM) & E1000_FWSM_MODE_MASK) ? 1 : 0; 213 mac->arc_subsystem_valid = (er32(FWSM) & E1000_FWSM_MODE_MASK) ? 1 : 0;
214 214
215 /* check for link */ 215 /* check for link */
216 switch (hw->media_type) { 216 switch (hw->phy.media_type) {
217 case e1000_media_type_copper: 217 case e1000_media_type_copper:
218 func->setup_physical_interface = e1000_setup_copper_link_80003es2lan; 218 func->setup_physical_interface = e1000_setup_copper_link_80003es2lan;
219 func->check_for_link = e1000e_check_for_copper_link; 219 func->check_for_link = e1000e_check_for_copper_link;
@@ -591,7 +591,7 @@ static s32 e1000_phy_force_speed_duplex_80003es2lan(struct e1000_hw *hw)
591 591
592 udelay(1); 592 udelay(1);
593 593
594 if (hw->phy.wait_for_link) { 594 if (hw->phy.autoneg_wait_to_complete) {
595 hw_dbg(hw, "Waiting for forced speed/duplex link " 595 hw_dbg(hw, "Waiting for forced speed/duplex link "
596 "on GG82563 phy.\n"); 596 "on GG82563 phy.\n");
597 597
@@ -682,7 +682,7 @@ static s32 e1000_get_link_up_info_80003es2lan(struct e1000_hw *hw, u16 *speed,
682{ 682{
683 s32 ret_val; 683 s32 ret_val;
684 684
685 if (hw->media_type == e1000_media_type_copper) { 685 if (hw->phy.media_type == e1000_media_type_copper) {
686 ret_val = e1000e_get_speed_and_duplex_copper(hw, 686 ret_val = e1000e_get_speed_and_duplex_copper(hw,
687 speed, 687 speed,
688 duplex); 688 duplex);
@@ -854,7 +854,7 @@ static void e1000_initialize_hw_bits_80003es2lan(struct e1000_hw *hw)
854 /* Transmit Arbitration Control 0 */ 854 /* Transmit Arbitration Control 0 */
855 reg = er32(TARC0); 855 reg = er32(TARC0);
856 reg &= ~(0xF << 27); /* 30:27 */ 856 reg &= ~(0xF << 27); /* 30:27 */
857 if (hw->media_type != e1000_media_type_copper) 857 if (hw->phy.media_type != e1000_media_type_copper)
858 reg &= ~(1 << 20); 858 reg &= ~(1 << 20);
859 ew32(TARC0, reg); 859 ew32(TARC0, reg);
860 860