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>
This commit is contained in:

committed by
David S. Miller

parent
fe75820b99
commit
9007b9fa36
@@ -610,13 +610,10 @@ static int efx_test_loopbacks(struct efx_nic *efx, struct efx_self_tests *tests,
|
||||
flush_workqueue(efx->workqueue);
|
||||
rmb();
|
||||
|
||||
/* We need both the phy and xaui links to be ok.
|
||||
* rather than relying on the falcon_xmac irq/poll
|
||||
* regime, just poll xaui directly */
|
||||
/* We need both the PHY and MAC-PHY links to be OK */
|
||||
link_up = efx->link_state.up;
|
||||
if (link_up && EFX_IS10G(efx) &&
|
||||
!falcon_xaui_link_ok(efx))
|
||||
link_up = false;
|
||||
if (link_up)
|
||||
link_up = !efx->mac_op->check_fault(efx);
|
||||
|
||||
} while ((++count < 20) && !link_up);
|
||||
|
||||
|
Reference in New Issue
Block a user