aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/falcon_xmac.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2010-12-02 08:47:51 -0500
committerDavid S. Miller <davem@davemloft.net>2010-12-03 12:08:09 -0500
commitcef68bde74f083d83c18ce870ed834e82ee0ae5a (patch)
tree430ee1d641b6d4f6c54c120fc500de6f9dbee797 /drivers/net/sfc/falcon_xmac.c
parent40641ed93cd53561f7d53b5fd5ed656b35f3aabd (diff)
sfc: Move xmac_poll_required into struct falcon_nic_data
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/falcon_xmac.c')
-rw-r--r--drivers/net/sfc/falcon_xmac.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/net/sfc/falcon_xmac.c b/drivers/net/sfc/falcon_xmac.c
index e293e25d1348..b49e84394641 100644
--- a/drivers/net/sfc/falcon_xmac.c
+++ b/drivers/net/sfc/falcon_xmac.c
@@ -87,6 +87,7 @@ int falcon_reset_xaui(struct efx_nic *efx)
87 87
88static void falcon_ack_status_intr(struct efx_nic *efx) 88static void falcon_ack_status_intr(struct efx_nic *efx)
89{ 89{
90 struct falcon_nic_data *nic_data = efx->nic_data;
90 efx_oword_t reg; 91 efx_oword_t reg;
91 92
92 if ((efx_nic_rev(efx) != EFX_REV_FALCON_B0) || LOOPBACK_INTERNAL(efx)) 93 if ((efx_nic_rev(efx) != EFX_REV_FALCON_B0) || LOOPBACK_INTERNAL(efx))
@@ -98,7 +99,7 @@ static void falcon_ack_status_intr(struct efx_nic *efx)
98 99
99 /* We can only use this interrupt to signal the negative edge of 100 /* We can only use this interrupt to signal the negative edge of
100 * xaui_align [we have to poll the positive edge]. */ 101 * xaui_align [we have to poll the positive edge]. */
101 if (efx->xmac_poll_required) 102 if (nic_data->xmac_poll_required)
102 return; 103 return;
103 104
104 efx_reado(efx, &reg, FR_AB_XM_MGT_INT_MSK); 105 efx_reado(efx, &reg, FR_AB_XM_MGT_INT_MSK);
@@ -276,12 +277,14 @@ static bool falcon_xmac_check_fault(struct efx_nic *efx)
276 277
277static int falcon_reconfigure_xmac(struct efx_nic *efx) 278static int falcon_reconfigure_xmac(struct efx_nic *efx)
278{ 279{
280 struct falcon_nic_data *nic_data = efx->nic_data;
281
279 falcon_reconfigure_xgxs_core(efx); 282 falcon_reconfigure_xgxs_core(efx);
280 falcon_reconfigure_xmac_core(efx); 283 falcon_reconfigure_xmac_core(efx);
281 284
282 falcon_reconfigure_mac_wrapper(efx); 285 falcon_reconfigure_mac_wrapper(efx);
283 286
284 efx->xmac_poll_required = !falcon_xmac_link_ok_retry(efx, 5); 287 nic_data->xmac_poll_required = !falcon_xmac_link_ok_retry(efx, 5);
285 falcon_ack_status_intr(efx); 288 falcon_ack_status_intr(efx);
286 289
287 return 0; 290 return 0;
@@ -349,11 +352,13 @@ static void falcon_update_stats_xmac(struct efx_nic *efx)
349 352
350void falcon_poll_xmac(struct efx_nic *efx) 353void falcon_poll_xmac(struct efx_nic *efx)
351{ 354{
355 struct falcon_nic_data *nic_data = efx->nic_data;
356
352 if (!EFX_WORKAROUND_5147(efx) || !efx->link_state.up || 357 if (!EFX_WORKAROUND_5147(efx) || !efx->link_state.up ||
353 !efx->xmac_poll_required) 358 !nic_data->xmac_poll_required)
354 return; 359 return;
355 360
356 efx->xmac_poll_required = !falcon_xmac_link_ok_retry(efx, 1); 361 nic_data->xmac_poll_required = !falcon_xmac_link_ok_retry(efx, 1);
357 falcon_ack_status_intr(efx); 362 falcon_ack_status_intr(efx);
358} 363}
359 364