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/phy.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/phy.c')
-rw-r--r-- | drivers/net/e1000e/phy.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/e1000e/phy.c b/drivers/net/e1000e/phy.c index a2da1c422354..3a4574caa75b 100644 --- a/drivers/net/e1000e/phy.c +++ b/drivers/net/e1000e/phy.c | |||
@@ -714,7 +714,7 @@ static s32 e1000_phy_setup_autoneg(struct e1000_hw *hw) | |||
714 | * other: No software override. The flow control configuration | 714 | * other: No software override. The flow control configuration |
715 | * in the EEPROM is used. | 715 | * in the EEPROM is used. |
716 | */ | 716 | */ |
717 | switch (hw->mac.fc) { | 717 | switch (hw->fc.type) { |
718 | case e1000_fc_none: | 718 | case e1000_fc_none: |
719 | /* | 719 | /* |
720 | * Flow control (Rx & Tx) is completely disabled by a | 720 | * Flow control (Rx & Tx) is completely disabled by a |
@@ -822,7 +822,7 @@ static s32 e1000_copper_link_autoneg(struct e1000_hw *hw) | |||
822 | * Does the user want to wait for Auto-Neg to complete here, or | 822 | * Does the user want to wait for Auto-Neg to complete here, or |
823 | * check at a later time (for example, callback routine). | 823 | * check at a later time (for example, callback routine). |
824 | */ | 824 | */ |
825 | if (phy->wait_for_link) { | 825 | if (phy->autoneg_wait_to_complete) { |
826 | ret_val = e1000_wait_autoneg(hw); | 826 | ret_val = e1000_wait_autoneg(hw); |
827 | if (ret_val) { | 827 | if (ret_val) { |
828 | hw_dbg(hw, "Error while waiting for " | 828 | hw_dbg(hw, "Error while waiting for " |
@@ -937,7 +937,7 @@ s32 e1000e_phy_force_speed_duplex_igp(struct e1000_hw *hw) | |||
937 | 937 | ||
938 | udelay(1); | 938 | udelay(1); |
939 | 939 | ||
940 | if (phy->wait_for_link) { | 940 | if (phy->autoneg_wait_to_complete) { |
941 | hw_dbg(hw, "Waiting for forced speed/duplex link on IGP phy.\n"); | 941 | hw_dbg(hw, "Waiting for forced speed/duplex link on IGP phy.\n"); |
942 | 942 | ||
943 | ret_val = e1000e_phy_has_link_generic(hw, | 943 | ret_val = e1000e_phy_has_link_generic(hw, |
@@ -1009,7 +1009,7 @@ s32 e1000e_phy_force_speed_duplex_m88(struct e1000_hw *hw) | |||
1009 | 1009 | ||
1010 | udelay(1); | 1010 | udelay(1); |
1011 | 1011 | ||
1012 | if (phy->wait_for_link) { | 1012 | if (phy->autoneg_wait_to_complete) { |
1013 | hw_dbg(hw, "Waiting for forced speed/duplex link on M88 phy.\n"); | 1013 | hw_dbg(hw, "Waiting for forced speed/duplex link on M88 phy.\n"); |
1014 | 1014 | ||
1015 | ret_val = e1000e_phy_has_link_generic(hw, PHY_FORCE_LIMIT, | 1015 | ret_val = e1000e_phy_has_link_generic(hw, PHY_FORCE_LIMIT, |
@@ -1084,7 +1084,7 @@ void e1000e_phy_force_speed_duplex_setup(struct e1000_hw *hw, u16 *phy_ctrl) | |||
1084 | u32 ctrl; | 1084 | u32 ctrl; |
1085 | 1085 | ||
1086 | /* Turn off flow control when forcing speed/duplex */ | 1086 | /* Turn off flow control when forcing speed/duplex */ |
1087 | mac->fc = e1000_fc_none; | 1087 | hw->fc.type = e1000_fc_none; |
1088 | 1088 | ||
1089 | /* Force speed/duplex on the mac */ | 1089 | /* Force speed/duplex on the mac */ |
1090 | ctrl = er32(CTRL); | 1090 | ctrl = er32(CTRL); |
@@ -1508,7 +1508,7 @@ s32 e1000e_get_phy_info_m88(struct e1000_hw *hw) | |||
1508 | u16 phy_data; | 1508 | u16 phy_data; |
1509 | bool link; | 1509 | bool link; |
1510 | 1510 | ||
1511 | if (hw->media_type != e1000_media_type_copper) { | 1511 | if (hw->phy.media_type != e1000_media_type_copper) { |
1512 | hw_dbg(hw, "Phy info is only valid for copper media\n"); | 1512 | hw_dbg(hw, "Phy info is only valid for copper media\n"); |
1513 | return -E1000_ERR_CONFIG; | 1513 | return -E1000_ERR_CONFIG; |
1514 | } | 1514 | } |