aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/ethernet/marvell/mvneta.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index b017818bccae..90ab2928e062 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -138,7 +138,9 @@
138#define MVNETA_GMAC_FORCE_LINK_PASS BIT(1) 138#define MVNETA_GMAC_FORCE_LINK_PASS BIT(1)
139#define MVNETA_GMAC_CONFIG_MII_SPEED BIT(5) 139#define MVNETA_GMAC_CONFIG_MII_SPEED BIT(5)
140#define MVNETA_GMAC_CONFIG_GMII_SPEED BIT(6) 140#define MVNETA_GMAC_CONFIG_GMII_SPEED BIT(6)
141#define MVNETA_GMAC_AN_SPEED_EN BIT(7)
141#define MVNETA_GMAC_CONFIG_FULL_DUPLEX BIT(12) 142#define MVNETA_GMAC_CONFIG_FULL_DUPLEX BIT(12)
143#define MVNETA_GMAC_AN_DUPLEX_EN BIT(13)
142#define MVNETA_MIB_COUNTERS_BASE 0x3080 144#define MVNETA_MIB_COUNTERS_BASE 0x3080
143#define MVNETA_MIB_LATE_COLLISION 0x7c 145#define MVNETA_MIB_LATE_COLLISION 0x7c
144#define MVNETA_DA_FILT_SPEC_MCAST 0x3400 146#define MVNETA_DA_FILT_SPEC_MCAST 0x3400
@@ -915,6 +917,13 @@ static void mvneta_defaults_set(struct mvneta_port *pp)
915 /* Assign port SDMA configuration */ 917 /* Assign port SDMA configuration */
916 mvreg_write(pp, MVNETA_SDMA_CONFIG, val); 918 mvreg_write(pp, MVNETA_SDMA_CONFIG, val);
917 919
920 /* Disable PHY polling in hardware, since we're using the
921 * kernel phylib to do this.
922 */
923 val = mvreg_read(pp, MVNETA_UNIT_CONTROL);
924 val &= ~MVNETA_PHY_POLLING_ENABLE;
925 mvreg_write(pp, MVNETA_UNIT_CONTROL, val);
926
918 mvneta_set_ucast_table(pp, -1); 927 mvneta_set_ucast_table(pp, -1);
919 mvneta_set_special_mcast_table(pp, -1); 928 mvneta_set_special_mcast_table(pp, -1);
920 mvneta_set_other_mcast_table(pp, -1); 929 mvneta_set_other_mcast_table(pp, -1);
@@ -2307,7 +2316,9 @@ static void mvneta_adjust_link(struct net_device *ndev)
2307 val = mvreg_read(pp, MVNETA_GMAC_AUTONEG_CONFIG); 2316 val = mvreg_read(pp, MVNETA_GMAC_AUTONEG_CONFIG);
2308 val &= ~(MVNETA_GMAC_CONFIG_MII_SPEED | 2317 val &= ~(MVNETA_GMAC_CONFIG_MII_SPEED |
2309 MVNETA_GMAC_CONFIG_GMII_SPEED | 2318 MVNETA_GMAC_CONFIG_GMII_SPEED |
2310 MVNETA_GMAC_CONFIG_FULL_DUPLEX); 2319 MVNETA_GMAC_CONFIG_FULL_DUPLEX |
2320 MVNETA_GMAC_AN_SPEED_EN |
2321 MVNETA_GMAC_AN_DUPLEX_EN);
2311 2322
2312 if (phydev->duplex) 2323 if (phydev->duplex)
2313 val |= MVNETA_GMAC_CONFIG_FULL_DUPLEX; 2324 val |= MVNETA_GMAC_CONFIG_FULL_DUPLEX;