diff options
author | Auke Kok <auke-jan.h.kok@intel.com> | 2007-10-31 18:22:10 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:03:44 -0500 |
commit | 3957d63da0067ad6a7dc8261b7eeb824f9dc42b4 (patch) | |
tree | 6566a29315969cb531f204d3a5c4ebcb8a1fc311 /drivers/net/ixgbe/ixgbe_common.c | |
parent | 040babf9d84e7010c457e9ce69e9eb1c27927c9e (diff) |
ixgbe: Fix copper PHY initialization code
While cleaning up the internal API focussing on Fiber and CX4 code
we found that I had broken the copper PHY initialization code. This
patch restores the PHY-specific code. This is mostly uninteresting
since no copper PHY boards are yet available. The changes have been
tested against Fiber only as I do not even have copper PHY versions
of 82598 macs.
This change actually cleans up the API code a bit more and we
lose some initialization code. A few PHY link detection helper
lines of code have been snuck into this patch, as well as a
read flush where it was suspected that this might cause issues.
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_common.c')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_common.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/ixgbe/ixgbe_common.c b/drivers/net/ixgbe/ixgbe_common.c index 512e3b22ed08..9c10c0584edf 100644 --- a/drivers/net/ixgbe/ixgbe_common.c +++ b/drivers/net/ixgbe/ixgbe_common.c | |||
@@ -74,7 +74,7 @@ s32 ixgbe_start_hw(struct ixgbe_hw *hw) | |||
74 | ixgbe_clear_vfta(hw); | 74 | ixgbe_clear_vfta(hw); |
75 | 75 | ||
76 | /* Set up link */ | 76 | /* Set up link */ |
77 | hw->phy.ops.setup(hw); | 77 | hw->mac.ops.setup_link(hw); |
78 | 78 | ||
79 | /* Clear statistics registers */ | 79 | /* Clear statistics registers */ |
80 | ixgbe_clear_hw_cntrs(hw); | 80 | ixgbe_clear_hw_cntrs(hw); |
@@ -83,6 +83,7 @@ s32 ixgbe_start_hw(struct ixgbe_hw *hw) | |||
83 | ctrl_ext = IXGBE_READ_REG(hw, IXGBE_CTRL_EXT); | 83 | ctrl_ext = IXGBE_READ_REG(hw, IXGBE_CTRL_EXT); |
84 | ctrl_ext |= IXGBE_CTRL_EXT_NS_DIS; | 84 | ctrl_ext |= IXGBE_CTRL_EXT_NS_DIS; |
85 | IXGBE_WRITE_REG(hw, IXGBE_CTRL_EXT, ctrl_ext); | 85 | IXGBE_WRITE_REG(hw, IXGBE_CTRL_EXT, ctrl_ext); |
86 | IXGBE_WRITE_FLUSH(hw); | ||
86 | 87 | ||
87 | /* Clear adapter stopped flag */ | 88 | /* Clear adapter stopped flag */ |
88 | hw->adapter_stopped = false; | 89 | hw->adapter_stopped = false; |
@@ -297,6 +298,7 @@ s32 ixgbe_led_on(struct ixgbe_hw *hw, u32 index) | |||
297 | led_reg &= ~IXGBE_LED_MODE_MASK(index); | 298 | led_reg &= ~IXGBE_LED_MODE_MASK(index); |
298 | led_reg |= IXGBE_LED_ON << IXGBE_LED_MODE_SHIFT(index); | 299 | led_reg |= IXGBE_LED_ON << IXGBE_LED_MODE_SHIFT(index); |
299 | IXGBE_WRITE_REG(hw, IXGBE_LEDCTL, led_reg); | 300 | IXGBE_WRITE_REG(hw, IXGBE_LEDCTL, led_reg); |
301 | IXGBE_WRITE_FLUSH(hw); | ||
300 | 302 | ||
301 | return 0; | 303 | return 0; |
302 | } | 304 | } |
@@ -314,6 +316,7 @@ s32 ixgbe_led_off(struct ixgbe_hw *hw, u32 index) | |||
314 | led_reg &= ~IXGBE_LED_MODE_MASK(index); | 316 | led_reg &= ~IXGBE_LED_MODE_MASK(index); |
315 | led_reg |= IXGBE_LED_OFF << IXGBE_LED_MODE_SHIFT(index); | 317 | led_reg |= IXGBE_LED_OFF << IXGBE_LED_MODE_SHIFT(index); |
316 | IXGBE_WRITE_REG(hw, IXGBE_LEDCTL, led_reg); | 318 | IXGBE_WRITE_REG(hw, IXGBE_LEDCTL, led_reg); |
319 | IXGBE_WRITE_FLUSH(hw); | ||
317 | 320 | ||
318 | return 0; | 321 | return 0; |
319 | } | 322 | } |
@@ -496,6 +499,7 @@ static void ixgbe_release_eeprom_semaphore(struct ixgbe_hw *hw) | |||
496 | /* Release both semaphores by writing 0 to the bits SWESMBI and SMBI */ | 499 | /* Release both semaphores by writing 0 to the bits SWESMBI and SMBI */ |
497 | swsm &= ~(IXGBE_SWSM_SWESMBI | IXGBE_SWSM_SMBI); | 500 | swsm &= ~(IXGBE_SWSM_SWESMBI | IXGBE_SWSM_SMBI); |
498 | IXGBE_WRITE_REG(hw, IXGBE_SWSM, swsm); | 501 | IXGBE_WRITE_REG(hw, IXGBE_SWSM, swsm); |
502 | IXGBE_WRITE_FLUSH(hw); | ||
499 | } | 503 | } |
500 | 504 | ||
501 | /** | 505 | /** |
@@ -1132,7 +1136,7 @@ void ixgbe_release_swfw_sync(struct ixgbe_hw *hw, u16 mask) | |||
1132 | } | 1136 | } |
1133 | 1137 | ||
1134 | /** | 1138 | /** |
1135 | * ixgbe_read_analog_reg8- Reads 8 bit 82598 Atlas analog register | 1139 | * ixgbe_read_analog_reg8 - Reads 8 bit Atlas analog register |
1136 | * @hw: pointer to hardware structure | 1140 | * @hw: pointer to hardware structure |
1137 | * @reg: analog register to read | 1141 | * @reg: analog register to read |
1138 | * @val: read value | 1142 | * @val: read value |
@@ -1154,7 +1158,7 @@ s32 ixgbe_read_analog_reg8(struct ixgbe_hw *hw, u32 reg, u8 *val) | |||
1154 | } | 1158 | } |
1155 | 1159 | ||
1156 | /** | 1160 | /** |
1157 | * ixgbe_write_analog_reg8- Writes 8 bit Atlas analog register | 1161 | * ixgbe_write_analog_reg8 - Writes 8 bit Atlas analog register |
1158 | * @hw: pointer to hardware structure | 1162 | * @hw: pointer to hardware structure |
1159 | * @reg: atlas register to write | 1163 | * @reg: atlas register to write |
1160 | * @val: value to write | 1164 | * @val: value to write |