diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2008-12-13 06:59:24 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-13 06:59:24 +0100 |
commit | 766ca0fa6bf1600bdf4bc7726c74f14c8455c6b8 (patch) | |
tree | b1ea2df622753f2493b1053fda21c0db3f18a043 /drivers/net/sfc/xfp_phy.c | |
parent | sfc: Implement auto-negotiation (diff) | |
download | linux-766ca0fa6bf1600bdf4bc7726c74f14c8455c6b8.tar.xz linux-766ca0fa6bf1600bdf4bc7726c74f14c8455c6b8.zip |
sfc: Rework MAC, PHY and board event handling
From: Steve Hodgson <shodgson@solarflare.com>
MAC, PHY and board events may be separately enabled and signalled.
Our current arrangement of chaining the polling functions can result
in events being missed. Change them to be more independent.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/xfp_phy.c')
-rw-r--r-- | drivers/net/sfc/xfp_phy.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/net/sfc/xfp_phy.c b/drivers/net/sfc/xfp_phy.c index fbe8e25a1ed5..345ffc310dca 100644 --- a/drivers/net/sfc/xfp_phy.c +++ b/drivers/net/sfc/xfp_phy.c @@ -119,24 +119,12 @@ static int xfp_link_ok(struct efx_nic *efx) return mdio_clause45_links_ok(efx, XFP_REQUIRED_DEVS); } -static int xfp_phy_check_hw(struct efx_nic *efx) +static void xfp_phy_poll(struct efx_nic *efx) { - int rc = 0; int link_up = xfp_link_ok(efx); /* Simulate a PHY event if link state has changed */ if (link_up != efx->link_up) falcon_sim_phy_event(efx); - - rc = efx->board_info.monitor(efx); - if (rc) { - struct xfp_phy_data *phy_data = efx->phy_data; - EFX_ERR(efx, "XFP sensor alert; putting PHY into low power\n"); - efx->phy_mode |= PHY_MODE_LOW_POWER; - mdio_clause45_set_mmds_lpower(efx, 1, XFP_REQUIRED_DEVS); - phy_data->phy_mode |= PHY_MODE_LOW_POWER; - } - - return rc; } static void xfp_phy_reconfigure(struct efx_nic *efx) @@ -173,7 +161,7 @@ struct efx_phy_operations falcon_xfp_phy_ops = { .macs = EFX_XMAC, .init = xfp_phy_init, .reconfigure = xfp_phy_reconfigure, - .check_hw = xfp_phy_check_hw, + .poll = xfp_phy_poll, .fini = xfp_phy_fini, .clear_interrupt = xfp_phy_clear_interrupt, .get_settings = mdio_clause45_get_settings, |