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>
This commit is contained in:
Ben Hutchings
2008-11-04 20:34:56 +00:00
committed by Jeff Garzik
parent f41507245e
commit 3e133c44d2
8 changed files with 265 additions and 64 deletions

View File

@@ -128,6 +128,15 @@ static int xfp_phy_check_hw(struct efx_nic *efx)
if (link_up != efx->link_up)
falcon_xmac_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;
}