diff options
Diffstat (limited to 'drivers/net/sfc/tenxpress.c')
-rw-r--r-- | drivers/net/sfc/tenxpress.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/sfc/tenxpress.c b/drivers/net/sfc/tenxpress.c index b3ca2dc8040d..1567ab538e27 100644 --- a/drivers/net/sfc/tenxpress.c +++ b/drivers/net/sfc/tenxpress.c | |||
@@ -445,14 +445,13 @@ static bool sft9001_link_ok(struct efx_nic *efx, struct ethtool_cmd *ecmd) | |||
445 | int phy_id = efx->mii.phy_id; | 445 | int phy_id = efx->mii.phy_id; |
446 | u32 reg; | 446 | u32 reg; |
447 | 447 | ||
448 | if (efx->loopback_mode == LOOPBACK_GPHY) | 448 | if (efx_phy_mode_disabled(efx->phy_mode)) |
449 | return true; | ||
450 | else if (efx_phy_mode_disabled(efx->phy_mode)) | ||
451 | return false; | 449 | return false; |
450 | else if (efx->loopback_mode == LOOPBACK_GPHY) | ||
451 | return true; | ||
452 | else if (efx->loopback_mode) | 452 | else if (efx->loopback_mode) |
453 | return mdio_clause45_links_ok(efx, | 453 | return mdio_clause45_links_ok(efx, |
454 | MDIO_MMDREG_DEVS_PMAPMD | | 454 | MDIO_MMDREG_DEVS_PMAPMD | |
455 | MDIO_MMDREG_DEVS_PCS | | ||
456 | MDIO_MMDREG_DEVS_PHYXS); | 455 | MDIO_MMDREG_DEVS_PHYXS); |
457 | 456 | ||
458 | /* We must use the same definition of link state as LASI, | 457 | /* We must use the same definition of link state as LASI, |
@@ -588,6 +587,10 @@ static void tenxpress_phy_poll(struct efx_nic *efx) | |||
588 | change = true; | 587 | change = true; |
589 | } | 588 | } |
590 | sfx7101_check_bad_lp(efx, link_ok); | 589 | sfx7101_check_bad_lp(efx, link_ok); |
590 | } else if (efx->loopback_mode) { | ||
591 | bool link_ok = sft9001_link_ok(efx, NULL); | ||
592 | if (link_ok != efx->link_up) | ||
593 | change = true; | ||
591 | } else { | 594 | } else { |
592 | u32 status = mdio_clause45_read(efx, efx->mii.phy_id, | 595 | u32 status = mdio_clause45_read(efx, efx->mii.phy_id, |
593 | MDIO_MMD_PMAPMD, | 596 | MDIO_MMD_PMAPMD, |