aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/falcon_boards.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2009-11-25 11:12:01 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-26 18:59:43 -0500
commit9007b9fa368b172e6b9a985899080fbebb7d3204 (patch)
tree3d725a55e193fe9763fcd514a6b4246eae8da957 /drivers/net/sfc/falcon_boards.c
parentfe75820b99ff2de713de23252432f0f9d0ca1d35 (diff)
sfc: Simplify XMAC link polling
From: Steve Hodgson <shodgson@solarflare.com> Only the XMAC on Falcon needs help from the driver to poll and reset the MAC-PHY link (XAUI); GMII is a simple parallel bus and on later NICs firmware takes care of the XAUI link. Also, an XMAC interrupt currently schedules a work item which simply clears a flag (efx_nic::mac_up) to be checked by the regular monitor (or the next link reconfiguration, if that is sooner). Rename the flag to xmac_poll_required, changing its sense. Remove the needless indirection and just set the flag immediately. Call falcon_xmac_poll() directly where required. Add a new generic operation mac_op::check_fault to check the link outside of regular monitoring, as required during self-tests. (Note that this leaves us with an unused work item, but we will immediately have another use for it.) Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/falcon_boards.c')
-rw-r--r--drivers/net/sfc/falcon_boards.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/sfc/falcon_boards.c b/drivers/net/sfc/falcon_boards.c
index 72d1c7834e6b..da750959c61a 100644
--- a/drivers/net/sfc/falcon_boards.c
+++ b/drivers/net/sfc/falcon_boards.c
@@ -380,7 +380,7 @@ static int sfe4001_check_hw(struct efx_nic *efx)
380 s32 status; 380 s32 status;
381 381
382 /* If XAUI link is up then do not monitor */ 382 /* If XAUI link is up then do not monitor */
383 if (EFX_WORKAROUND_7884(efx) && efx->mac_up) 383 if (EFX_WORKAROUND_7884(efx) && !efx->xmac_poll_required)
384 return 0; 384 return 0;
385 385
386 /* Check the powered status of the PHY. Lack of power implies that 386 /* Check the powered status of the PHY. Lack of power implies that
@@ -468,7 +468,7 @@ static int sfn4111t_check_hw(struct efx_nic *efx)
468 s32 status; 468 s32 status;
469 469
470 /* If XAUI link is up then do not monitor */ 470 /* If XAUI link is up then do not monitor */
471 if (EFX_WORKAROUND_7884(efx) && efx->mac_up) 471 if (EFX_WORKAROUND_7884(efx) && !efx->xmac_poll_required)
472 return 0; 472 return 0;
473 473
474 /* Test LHIGH, RHIGH, FAULT, EOT and IOT alarms */ 474 /* Test LHIGH, RHIGH, FAULT, EOT and IOT alarms */