diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2009-11-25 11:12:01 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-26 18:59:43 -0500 |
commit | 9007b9fa368b172e6b9a985899080fbebb7d3204 (patch) | |
tree | 3d725a55e193fe9763fcd514a6b4246eae8da957 /drivers/net/sfc/selftest.c | |
parent | fe75820b99ff2de713de23252432f0f9d0ca1d35 (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/selftest.c')
-rw-r--r-- | drivers/net/sfc/selftest.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/sfc/selftest.c b/drivers/net/sfc/selftest.c index 63ff295334e4..23e646a6c2cf 100644 --- a/drivers/net/sfc/selftest.c +++ b/drivers/net/sfc/selftest.c | |||
@@ -610,13 +610,10 @@ static int efx_test_loopbacks(struct efx_nic *efx, struct efx_self_tests *tests, | |||
610 | flush_workqueue(efx->workqueue); | 610 | flush_workqueue(efx->workqueue); |
611 | rmb(); | 611 | rmb(); |
612 | 612 | ||
613 | /* We need both the phy and xaui links to be ok. | 613 | /* We need both the PHY and MAC-PHY links to be OK */ |
614 | * rather than relying on the falcon_xmac irq/poll | ||
615 | * regime, just poll xaui directly */ | ||
616 | link_up = efx->link_state.up; | 614 | link_up = efx->link_state.up; |
617 | if (link_up && EFX_IS10G(efx) && | 615 | if (link_up) |
618 | !falcon_xaui_link_ok(efx)) | 616 | link_up = !efx->mac_op->check_fault(efx); |
619 | link_up = false; | ||
620 | 617 | ||
621 | } while ((++count < 20) && !link_up); | 618 | } while ((++count < 20) && !link_up); |
622 | 619 | ||