aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmil Tantilov <emil.s.tantilov@intel.com>2011-04-13 00:56:15 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2011-05-04 15:13:59 -0400
commit6d980c3e50189e5437fdb5ef2c6e6d3c282035dc (patch)
tree20c1195b8f495a8f0f93f7b3041288dc3aa88521
parent97322b3303a1de979b973dc1d0a43091f27258ac (diff)
ixgbe: Use function pointer for ixgbe_acquire/release_swfw_sync()
Change remaining direct calls to function pointers. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Evan Swanson <evan.swanson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r--drivers/net/ixgbe/ixgbe_82599.c3
-rw-r--r--drivers/net/ixgbe/ixgbe_phy.c10
-rw-r--r--drivers/net/ixgbe/ixgbe_x540.c2
3 files changed, 7 insertions, 8 deletions
diff --git a/drivers/net/ixgbe/ixgbe_82599.c b/drivers/net/ixgbe/ixgbe_82599.c
index d1cda36507f8..5b8e17efd8d2 100644
--- a/drivers/net/ixgbe/ixgbe_82599.c
+++ b/drivers/net/ixgbe/ixgbe_82599.c
@@ -110,7 +110,6 @@ static s32 ixgbe_setup_sfp_modules_82599(struct ixgbe_hw *hw)
110 110
111 ret_val = ixgbe_get_sfp_init_sequence_offsets(hw, &list_offset, 111 ret_val = ixgbe_get_sfp_init_sequence_offsets(hw, &list_offset,
112 &data_offset); 112 &data_offset);
113
114 if (ret_val != 0) 113 if (ret_val != 0)
115 goto setup_sfp_out; 114 goto setup_sfp_out;
116 115
@@ -130,7 +129,7 @@ static s32 ixgbe_setup_sfp_modules_82599(struct ixgbe_hw *hw)
130 } 129 }
131 130
132 /* Release the semaphore */ 131 /* Release the semaphore */
133 ixgbe_release_swfw_sync(hw, IXGBE_GSSR_MAC_CSR_SM); 132 hw->mac.ops.release_swfw_sync(hw, IXGBE_GSSR_MAC_CSR_SM);
134 /* 133 /*
135 * Delay obtaining semaphore again to allow FW access, 134 * Delay obtaining semaphore again to allow FW access,
136 * semaphore_delay is in ms usleep_range needs us. 135 * semaphore_delay is in ms usleep_range needs us.
diff --git a/drivers/net/ixgbe/ixgbe_phy.c b/drivers/net/ixgbe/ixgbe_phy.c
index edcaaebd72b2..735f686c3b36 100644
--- a/drivers/net/ixgbe/ixgbe_phy.c
+++ b/drivers/net/ixgbe/ixgbe_phy.c
@@ -1222,7 +1222,7 @@ s32 ixgbe_read_i2c_byte_generic(struct ixgbe_hw *hw, u8 byte_offset,
1222 swfw_mask = IXGBE_GSSR_PHY0_SM; 1222 swfw_mask = IXGBE_GSSR_PHY0_SM;
1223 1223
1224 do { 1224 do {
1225 if (ixgbe_acquire_swfw_sync(hw, swfw_mask) != 0) { 1225 if (hw->mac.ops.acquire_swfw_sync(hw, swfw_mask) != 0) {
1226 status = IXGBE_ERR_SWFW_SYNC; 1226 status = IXGBE_ERR_SWFW_SYNC;
1227 goto read_byte_out; 1227 goto read_byte_out;
1228 } 1228 }
@@ -1269,7 +1269,7 @@ s32 ixgbe_read_i2c_byte_generic(struct ixgbe_hw *hw, u8 byte_offset,
1269 break; 1269 break;
1270 1270
1271fail: 1271fail:
1272 ixgbe_release_swfw_sync(hw, swfw_mask); 1272 hw->mac.ops.release_swfw_sync(hw, swfw_mask);
1273 msleep(100); 1273 msleep(100);
1274 ixgbe_i2c_bus_clear(hw); 1274 ixgbe_i2c_bus_clear(hw);
1275 retry++; 1275 retry++;
@@ -1280,7 +1280,7 @@ fail:
1280 1280
1281 } while (retry < max_retry); 1281 } while (retry < max_retry);
1282 1282
1283 ixgbe_release_swfw_sync(hw, swfw_mask); 1283 hw->mac.ops.release_swfw_sync(hw, swfw_mask);
1284 1284
1285read_byte_out: 1285read_byte_out:
1286 return status; 1286 return status;
@@ -1308,7 +1308,7 @@ s32 ixgbe_write_i2c_byte_generic(struct ixgbe_hw *hw, u8 byte_offset,
1308 else 1308 else
1309 swfw_mask = IXGBE_GSSR_PHY0_SM; 1309 swfw_mask = IXGBE_GSSR_PHY0_SM;
1310 1310
1311 if (ixgbe_acquire_swfw_sync(hw, swfw_mask) != 0) { 1311 if (hw->mac.ops.acquire_swfw_sync(hw, swfw_mask) != 0) {
1312 status = IXGBE_ERR_SWFW_SYNC; 1312 status = IXGBE_ERR_SWFW_SYNC;
1313 goto write_byte_out; 1313 goto write_byte_out;
1314 } 1314 }
@@ -1352,7 +1352,7 @@ fail:
1352 hw_dbg(hw, "I2C byte write error.\n"); 1352 hw_dbg(hw, "I2C byte write error.\n");
1353 } while (retry < max_retry); 1353 } while (retry < max_retry);
1354 1354
1355 ixgbe_release_swfw_sync(hw, swfw_mask); 1355 hw->mac.ops.release_swfw_sync(hw, swfw_mask);
1356 1356
1357write_byte_out: 1357write_byte_out:
1358 return status; 1358 return status;
diff --git a/drivers/net/ixgbe/ixgbe_x540.c b/drivers/net/ixgbe/ixgbe_x540.c
index 75c6465db893..179ee8226d04 100644
--- a/drivers/net/ixgbe/ixgbe_x540.c
+++ b/drivers/net/ixgbe/ixgbe_x540.c
@@ -318,7 +318,7 @@ static s32 ixgbe_read_eerd_X540(struct ixgbe_hw *hw, u16 offset, u16 *data)
318 else 318 else
319 status = IXGBE_ERR_SWFW_SYNC; 319 status = IXGBE_ERR_SWFW_SYNC;
320 320
321 ixgbe_release_swfw_sync_X540(hw, IXGBE_GSSR_EEP_SM); 321 hw->mac.ops.release_swfw_sync(hw, IXGBE_GSSR_EEP_SM);
322 return status; 322 return status;
323} 323}
324 324