aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/xfp_phy.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2008-11-04 15:34:56 -0500
committerJeff Garzik <jgarzik@redhat.com>2008-11-06 00:50:09 -0500
commit3e133c44d24a094118caee182200462d46c55b56 (patch)
treecabc1821bef090abedd1891c3d16137dea8f2ef3 /drivers/net/sfc/xfp_phy.c
parentf41507245ef8b079685aba8da5b5b2b5e87e70bc (diff)
sfc: Use lm87 and lm90 drivers for board temperature/power monitoring
Add board monitoring to periodic work whenever link is down. For SFE4001, report when a fault has caused the PHY to turn off. For SFE4002, switch XFP PHY into low-power state in case of a fault. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/sfc/xfp_phy.c')
-rw-r--r--drivers/net/sfc/xfp_phy.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/sfc/xfp_phy.c b/drivers/net/sfc/xfp_phy.c
index 276151df3a70..91f024662101 100644
--- a/drivers/net/sfc/xfp_phy.c
+++ b/drivers/net/sfc/xfp_phy.c
@@ -128,6 +128,15 @@ static int xfp_phy_check_hw(struct efx_nic *efx)
128 if (link_up != efx->link_up) 128 if (link_up != efx->link_up)
129 falcon_xmac_sim_phy_event(efx); 129 falcon_xmac_sim_phy_event(efx);
130 130
131 rc = efx->board_info.monitor(efx);
132 if (rc) {
133 struct xfp_phy_data *phy_data = efx->phy_data;
134 EFX_ERR(efx, "XFP sensor alert; putting PHY into low power\n");
135 efx->phy_mode |= PHY_MODE_LOW_POWER;
136 mdio_clause45_set_mmds_lpower(efx, 1, XFP_REQUIRED_DEVS);
137 phy_data->phy_mode |= PHY_MODE_LOW_POWER;
138 }
139
131 return rc; 140 return rc;
132} 141}
133 142