diff options
author | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2008-03-28 12:15:16 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2008-03-28 22:15:00 -0400 |
commit | 318a94d68979cbe9cc98a3050b4b7be2f08513c8 (patch) | |
tree | 32fdd0bd9f4a0c9dcc2a958b18820286a9acdcec /drivers/net/e1000e/ich8lan.c | |
parent | e2de3eb69c40c01739ce9b154c65e51d94d72966 (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/ich8lan.c')
-rw-r--r-- | drivers/net/e1000e/ich8lan.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c index eed1b449691..e358a773e67 100644 --- a/drivers/net/e1000e/ich8lan.c +++ b/drivers/net/e1000e/ich8lan.c | |||
@@ -298,7 +298,7 @@ static s32 e1000_init_mac_params_ich8lan(struct e1000_adapter *adapter) | |||
298 | struct e1000_mac_info *mac = &hw->mac; | 298 | struct e1000_mac_info *mac = &hw->mac; |
299 | 299 | ||
300 | /* Set media type function pointer */ | 300 | /* Set media type function pointer */ |
301 | hw->media_type = e1000_media_type_copper; | 301 | hw->phy.media_type = e1000_media_type_copper; |
302 | 302 | ||
303 | /* Set mta register count */ | 303 | /* Set mta register count */ |
304 | mac->mta_reg_count = 32; | 304 | mac->mta_reg_count = 32; |
@@ -453,7 +453,7 @@ static s32 e1000_phy_force_speed_duplex_ich8lan(struct e1000_hw *hw) | |||
453 | 453 | ||
454 | udelay(1); | 454 | udelay(1); |
455 | 455 | ||
456 | if (phy->wait_for_link) { | 456 | if (phy->autoneg_wait_to_complete) { |
457 | hw_dbg(hw, "Waiting for forced speed/duplex link on IFE phy.\n"); | 457 | hw_dbg(hw, "Waiting for forced speed/duplex link on IFE phy.\n"); |
458 | 458 | ||
459 | ret_val = e1000e_phy_has_link_generic(hw, | 459 | ret_val = e1000e_phy_has_link_generic(hw, |
@@ -1852,7 +1852,6 @@ static void e1000_initialize_hw_bits_ich8lan(struct e1000_hw *hw) | |||
1852 | **/ | 1852 | **/ |
1853 | static s32 e1000_setup_link_ich8lan(struct e1000_hw *hw) | 1853 | static s32 e1000_setup_link_ich8lan(struct e1000_hw *hw) |
1854 | { | 1854 | { |
1855 | struct e1000_mac_info *mac = &hw->mac; | ||
1856 | s32 ret_val; | 1855 | s32 ret_val; |
1857 | 1856 | ||
1858 | if (e1000_check_reset_block(hw)) | 1857 | if (e1000_check_reset_block(hw)) |
@@ -1863,19 +1862,19 @@ static s32 e1000_setup_link_ich8lan(struct e1000_hw *hw) | |||
1863 | * the default flow control setting, so we explicitly | 1862 | * the default flow control setting, so we explicitly |
1864 | * set it to full. | 1863 | * set it to full. |
1865 | */ | 1864 | */ |
1866 | if (mac->fc == e1000_fc_default) | 1865 | if (hw->fc.type == e1000_fc_default) |
1867 | mac->fc = e1000_fc_full; | 1866 | hw->fc.type = e1000_fc_full; |
1868 | 1867 | ||
1869 | mac->original_fc = mac->fc; | 1868 | hw->fc.original_type = hw->fc.type; |
1870 | 1869 | ||
1871 | hw_dbg(hw, "After fix-ups FlowControl is now = %x\n", mac->fc); | 1870 | hw_dbg(hw, "After fix-ups FlowControl is now = %x\n", hw->fc.type); |
1872 | 1871 | ||
1873 | /* Continue to configure the copper link. */ | 1872 | /* Continue to configure the copper link. */ |
1874 | ret_val = e1000_setup_copper_link_ich8lan(hw); | 1873 | ret_val = e1000_setup_copper_link_ich8lan(hw); |
1875 | if (ret_val) | 1874 | if (ret_val) |
1876 | return ret_val; | 1875 | return ret_val; |
1877 | 1876 | ||
1878 | ew32(FCTTV, mac->fc_pause_time); | 1877 | ew32(FCTTV, hw->fc.pause_time); |
1879 | 1878 | ||
1880 | return e1000e_set_fc_watermarks(hw); | 1879 | return e1000e_set_fc_watermarks(hw); |
1881 | } | 1880 | } |