summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>2009-05-19 09:18:34 +0000
committerDavid S. Miller <davem@davemloft.net>2009-05-19 15:36:13 -0700
commitaa5aec888585fedcda7cfffc20f75240ad1cb42d (patch)
tree38028b9825b90ab8caef718f169cef2f69b00e77
parent3577aa1bd7efc9c474f59738d2fb89c168168d55 (diff)
downloadkernel-crypto-aa5aec888585fedcda7cfffc20f75240ad1cb42d.tar.gz
kernel-crypto-aa5aec888585fedcda7cfffc20f75240ad1cb42d.tar.xz
kernel-crypto-aa5aec888585fedcda7cfffc20f75240ad1cb42d.zip
ixgbe: Add semaphore access for PHY initialization for 82599
The SFP+ NIC (device id 0x10fb) needs a semaphore to serialize PHY access, so our PHY init code must honor that same semaphore. Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ixgbe/ixgbe_82599.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/ixgbe/ixgbe_82599.c b/drivers/net/ixgbe/ixgbe_82599.c
index 39d7b64aced..fef7397accd 100644
--- a/drivers/net/ixgbe/ixgbe_82599.c
+++ b/drivers/net/ixgbe/ixgbe_82599.c
@@ -109,6 +109,13 @@ s32 ixgbe_setup_sfp_modules_82599(struct ixgbe_hw *hw)
if (ret_val != 0)
goto setup_sfp_out;
+ /* PHY config will finish before releasing the semaphore */
+ ret_val = ixgbe_acquire_swfw_sync(hw, IXGBE_GSSR_MAC_CSR_SM);
+ if (ret_val != 0) {
+ ret_val = IXGBE_ERR_SWFW_SYNC;
+ goto setup_sfp_out;
+ }
+
hw->eeprom.ops.read(hw, ++data_offset, &data_value);
while (data_value != 0xffff) {
IXGBE_WRITE_REG(hw, IXGBE_CORECTL, data_value);
@@ -119,6 +126,11 @@ s32 ixgbe_setup_sfp_modules_82599(struct ixgbe_hw *hw)
IXGBE_WRITE_REG(hw, IXGBE_CORECTL, 0x00000102);
IXGBE_WRITE_REG(hw, IXGBE_CORECTL, 0x00000b1d);
IXGBE_WRITE_FLUSH(hw);
+
+ /* Release the semaphore */
+ ixgbe_release_swfw_sync(hw, IXGBE_GSSR_MAC_CSR_SM);
+ /* Delay obtaining semaphore again to allow FW access */
+ msleep(hw->eeprom.semaphore_delay);
}
setup_sfp_out: