diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2009-11-25 11:11:45 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-26 18:59:40 -0500 |
commit | fe75820b99ff2de713de23252432f0f9d0ca1d35 (patch) | |
tree | ca03ef31a0e3a5352628038db11c5c61e9341da1 /drivers/net/sfc/falcon.c | |
parent | 55edc6e6ff728681ebc10d418222740705376664 (diff) |
sfc: Move Falcon board/PHY/MAC monitoring code to falcon.c
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/falcon.c')
-rw-r--r-- | drivers/net/sfc/falcon.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/sfc/falcon.c b/drivers/net/sfc/falcon.c index 3ab2daff6b48..c43c5e6f077b 100644 --- a/drivers/net/sfc/falcon.c +++ b/drivers/net/sfc/falcon.c | |||
@@ -2612,6 +2612,21 @@ fail5: | |||
2612 | return rc; | 2612 | return rc; |
2613 | } | 2613 | } |
2614 | 2614 | ||
2615 | void falcon_monitor(struct efx_nic *efx) | ||
2616 | { | ||
2617 | int rc; | ||
2618 | |||
2619 | rc = falcon_board(efx)->type->monitor(efx); | ||
2620 | if (rc) { | ||
2621 | EFX_ERR(efx, "Board sensor %s; shutting down PHY\n", | ||
2622 | (rc == -ERANGE) ? "reported fault" : "failed"); | ||
2623 | efx->phy_mode |= PHY_MODE_LOW_POWER; | ||
2624 | falcon_sim_phy_event(efx); | ||
2625 | } | ||
2626 | efx->phy_op->poll(efx); | ||
2627 | efx->mac_op->poll(efx); | ||
2628 | } | ||
2629 | |||
2615 | /* Zeroes out the SRAM contents. This routine must be called in | 2630 | /* Zeroes out the SRAM contents. This routine must be called in |
2616 | * process context and is allowed to sleep. | 2631 | * process context and is allowed to sleep. |
2617 | */ | 2632 | */ |