aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/tenxpress.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/sfc/tenxpress.c')
-rw-r--r--drivers/net/sfc/tenxpress.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/net/sfc/tenxpress.c b/drivers/net/sfc/tenxpress.c
index d507c93d666e..8d41c29b9d7b 100644
--- a/drivers/net/sfc/tenxpress.c
+++ b/drivers/net/sfc/tenxpress.c
@@ -376,6 +376,7 @@ static int tenxpress_phy_check_hw(struct efx_nic *efx)
376{ 376{
377 struct tenxpress_phy_data *phy_data = efx->phy_data; 377 struct tenxpress_phy_data *phy_data = efx->phy_data;
378 bool link_ok; 378 bool link_ok;
379 int rc = 0;
379 380
380 link_ok = tenxpress_link_ok(efx, true); 381 link_ok = tenxpress_link_ok(efx, true);
381 382
@@ -391,7 +392,22 @@ static int tenxpress_phy_check_hw(struct efx_nic *efx)
391 atomic_set(&phy_data->bad_crc_count, 0); 392 atomic_set(&phy_data->bad_crc_count, 0);
392 } 393 }
393 394
394 return 0; 395 rc = efx->board_info.monitor(efx);
396 if (rc) {
397 EFX_ERR(efx, "Board sensor %s; shutting down PHY\n",
398 (rc == -ERANGE) ? "reported fault" : "failed");
399 if (efx->phy_mode & PHY_MODE_OFF) {
400 /* Assume that board has shut PHY off */
401 phy_data->phy_mode = PHY_MODE_OFF;
402 } else {
403 efx->phy_mode |= PHY_MODE_LOW_POWER;
404 mdio_clause45_set_mmds_lpower(efx, true,
405 efx->phy_op->mmds);
406 phy_data->phy_mode |= PHY_MODE_LOW_POWER;
407 }
408 }
409
410 return rc;
395} 411}
396 412
397static void tenxpress_phy_fini(struct efx_nic *efx) 413static void tenxpress_phy_fini(struct efx_nic *efx)