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/falcon_gmac.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/falcon_gmac.c')
-rw-r--r-- | drivers/net/sfc/falcon_gmac.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/sfc/falcon_gmac.c b/drivers/net/sfc/falcon_gmac.c index 2aeb3fc02786..66d499cc23f2 100644 --- a/drivers/net/sfc/falcon_gmac.c +++ b/drivers/net/sfc/falcon_gmac.c | |||
@@ -216,9 +216,13 @@ static void falcon_update_stats_gmac(struct efx_nic *efx) | |||
216 | mac_stats->rx_lt64 = mac_stats->rx_good_lt64 + mac_stats->rx_bad_lt64; | 216 | mac_stats->rx_lt64 = mac_stats->rx_good_lt64 + mac_stats->rx_bad_lt64; |
217 | } | 217 | } |
218 | 218 | ||
219 | static bool falcon_gmac_check_fault(struct efx_nic *efx) | ||
220 | { | ||
221 | return false; | ||
222 | } | ||
223 | |||
219 | struct efx_mac_operations falcon_gmac_operations = { | 224 | struct efx_mac_operations falcon_gmac_operations = { |
220 | .reconfigure = falcon_reconfigure_gmac, | 225 | .reconfigure = falcon_reconfigure_gmac, |
221 | .update_stats = falcon_update_stats_gmac, | 226 | .update_stats = falcon_update_stats_gmac, |
222 | .irq = efx_port_dummy_op_void, | 227 | .check_fault = falcon_gmac_check_fault, |
223 | .poll = efx_port_dummy_op_void, | ||
224 | }; | 228 | }; |