diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/sfc/falcon_xmac.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/drivers/net/sfc/falcon_xmac.c b/drivers/net/sfc/falcon_xmac.c index 8ccab2c67a20..3d65abf85b97 100644 --- a/drivers/net/sfc/falcon_xmac.c +++ b/drivers/net/sfc/falcon_xmac.c | |||
@@ -85,14 +85,14 @@ int falcon_reset_xaui(struct efx_nic *efx) | |||
85 | return -ETIMEDOUT; | 85 | return -ETIMEDOUT; |
86 | } | 86 | } |
87 | 87 | ||
88 | static void falcon_mask_status_intr(struct efx_nic *efx, bool enable) | 88 | static void falcon_ack_status_intr(struct efx_nic *efx) |
89 | { | 89 | { |
90 | efx_oword_t reg; | 90 | efx_oword_t reg; |
91 | 91 | ||
92 | if ((efx_nic_rev(efx) != EFX_REV_FALCON_B0) || LOOPBACK_INTERNAL(efx)) | 92 | if ((efx_nic_rev(efx) != EFX_REV_FALCON_B0) || LOOPBACK_INTERNAL(efx)) |
93 | return; | 93 | return; |
94 | 94 | ||
95 | /* We expect xgmii faults if the wireside link is up */ | 95 | /* We expect xgmii faults if the wireside link is down */ |
96 | if (!EFX_WORKAROUND_5147(efx) || !efx->link_state.up) | 96 | if (!EFX_WORKAROUND_5147(efx) || !efx->link_state.up) |
97 | return; | 97 | return; |
98 | 98 | ||
@@ -101,14 +101,7 @@ static void falcon_mask_status_intr(struct efx_nic *efx, bool enable) | |||
101 | if (efx->xmac_poll_required) | 101 | if (efx->xmac_poll_required) |
102 | return; | 102 | return; |
103 | 103 | ||
104 | /* Flush the ISR */ | 104 | efx_reado(efx, ®, FR_AB_XM_MGT_INT_MSK); |
105 | if (enable) | ||
106 | efx_reado(efx, ®, FR_AB_XM_MGT_INT_MSK); | ||
107 | |||
108 | EFX_POPULATE_OWORD_2(reg, | ||
109 | FRF_AB_XM_MSK_RMTFLT, !enable, | ||
110 | FRF_AB_XM_MSK_LCLFLT, !enable); | ||
111 | efx_writeo(efx, ®, FR_AB_XM_MGT_INT_MASK); | ||
112 | } | 105 | } |
113 | 106 | ||
114 | static bool falcon_xgxs_link_ok(struct efx_nic *efx) | 107 | static bool falcon_xgxs_link_ok(struct efx_nic *efx) |
@@ -283,15 +276,13 @@ static bool falcon_xmac_check_fault(struct efx_nic *efx) | |||
283 | 276 | ||
284 | static int falcon_reconfigure_xmac(struct efx_nic *efx) | 277 | static int falcon_reconfigure_xmac(struct efx_nic *efx) |
285 | { | 278 | { |
286 | falcon_mask_status_intr(efx, false); | ||
287 | |||
288 | falcon_reconfigure_xgxs_core(efx); | 279 | falcon_reconfigure_xgxs_core(efx); |
289 | falcon_reconfigure_xmac_core(efx); | 280 | falcon_reconfigure_xmac_core(efx); |
290 | 281 | ||
291 | falcon_reconfigure_mac_wrapper(efx); | 282 | falcon_reconfigure_mac_wrapper(efx); |
292 | 283 | ||
293 | efx->xmac_poll_required = !falcon_xmac_link_ok_retry(efx, 5); | 284 | efx->xmac_poll_required = !falcon_xmac_link_ok_retry(efx, 5); |
294 | falcon_mask_status_intr(efx, true); | 285 | falcon_ack_status_intr(efx); |
295 | 286 | ||
296 | return 0; | 287 | return 0; |
297 | } | 288 | } |
@@ -362,9 +353,8 @@ void falcon_poll_xmac(struct efx_nic *efx) | |||
362 | !efx->xmac_poll_required) | 353 | !efx->xmac_poll_required) |
363 | return; | 354 | return; |
364 | 355 | ||
365 | falcon_mask_status_intr(efx, false); | ||
366 | efx->xmac_poll_required = !falcon_xmac_link_ok_retry(efx, 1); | 356 | efx->xmac_poll_required = !falcon_xmac_link_ok_retry(efx, 1); |
367 | falcon_mask_status_intr(efx, true); | 357 | falcon_ack_status_intr(efx); |
368 | } | 358 | } |
369 | 359 | ||
370 | struct efx_mac_operations falcon_xmac_operations = { | 360 | struct efx_mac_operations falcon_xmac_operations = { |