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.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/net/sfc/tenxpress.c b/drivers/net/sfc/tenxpress.c
index db723c58f6f1..f4d509015f75 100644
--- a/drivers/net/sfc/tenxpress.c
+++ b/drivers/net/sfc/tenxpress.c
@@ -63,6 +63,7 @@
63 63
64/* extended status register */ 64/* extended status register */
65#define PMA_PMD_XSTATUS_REG 49153 65#define PMA_PMD_XSTATUS_REG 49153
66#define PMA_PMD_XSTAT_MDIX_LBN 14
66#define PMA_PMD_XSTAT_FLP_LBN (12) 67#define PMA_PMD_XSTAT_FLP_LBN (12)
67 68
68/* LED control register */ 69/* LED control register */
@@ -741,9 +742,17 @@ tenxpress_get_settings(struct efx_nic *efx, struct ethtool_cmd *ecmd)
741 742
742 mdio45_ethtool_gset_npage(&efx->mdio, ecmd, adv, lpa); 743 mdio45_ethtool_gset_npage(&efx->mdio, ecmd, adv, lpa);
743 744
744 if (efx->phy_type != PHY_TYPE_SFX7101) 745 if (efx->phy_type != PHY_TYPE_SFX7101) {
745 ecmd->supported |= (SUPPORTED_100baseT_Full | 746 ecmd->supported |= (SUPPORTED_100baseT_Full |
746 SUPPORTED_1000baseT_Full); 747 SUPPORTED_1000baseT_Full);
748 if (ecmd->speed != SPEED_10000) {
749 ecmd->eth_tp_mdix =
750 (efx_mdio_read(efx, MDIO_MMD_PMAPMD,
751 PMA_PMD_XSTATUS_REG) &
752 (1 << PMA_PMD_XSTAT_MDIX_LBN))
753 ? ETH_TP_MDI_X : ETH_TP_MDI;
754 }
755 }
747 756
748 /* In loopback, the PHY automatically brings up the correct interface, 757 /* In loopback, the PHY automatically brings up the correct interface,
749 * but doesn't advertise the correct speed. So override it */ 758 * but doesn't advertise the correct speed. So override it */