[U-Boot] [PATCH] net: phy: Fix networking regression on some mx6 boards
Fabio Estevam
festevam at gmail.com
Thu Jul 18 23:04:34 CEST 2013
From: Fabio Estevam <fabio.estevam at freescale.com>
Since commit de1d786edf (add support for Xilinx 1000BASE-X phy (GTX))
we are no longer able to use tftp transfers on some mx6 boards
like mx6qsabresd and wandboard, which use AR8031 Ethernet phy.
Revert the commit as a proper fix is still not available.
Reported-by: Sascha Silbe <t-uboot at infra-silbe.de>
Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
---
drivers/net/phy/phy.c | 21 ---------------------
include/linux/ethtool.h | 4 ----
include/linux/mii.h | 2 --
3 files changed, 27 deletions(-)
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 7c0eaec..77d19c6 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -75,10 +75,6 @@ static int genphy_config_advert(struct phy_device *phydev)
adv |= ADVERTISE_PAUSE_CAP;
if (advertise & ADVERTISED_Asym_Pause)
adv |= ADVERTISE_PAUSE_ASYM;
- if (advertise & ADVERTISED_1000baseX_Half)
- adv |= ADVERTISE_1000XHALF;
- if (advertise & ADVERTISED_1000baseX_Full)
- adv |= ADVERTISE_1000XFULL;
if (adv != oldadv) {
err = phy_write(phydev, MDIO_DEVAD_NONE, MII_ADVERTISE, adv);
@@ -292,7 +288,6 @@ int genphy_parse_link(struct phy_device *phydev)
if (mii_reg & BMSR_ANEGCAPABLE) {
u32 lpa = 0;
u32 gblpa = 0;
- u32 estatus = 0;
/* Check for gigabit capability */
if (mii_reg & BMSR_ERCAP) {
@@ -332,18 +327,6 @@ int genphy_parse_link(struct phy_device *phydev)
} else if (lpa & LPA_10FULL)
phydev->duplex = DUPLEX_FULL;
-
- if (mii_reg & BMSR_ESTATEN)
- estatus = phy_read(phydev, MDIO_DEVAD_NONE,
- MII_ESTATUS);
-
- if (estatus & (ESTATUS_1000_XFULL | ESTATUS_1000_XHALF |
- ESTATUS_1000_TFULL | ESTATUS_1000_THALF)) {
- phydev->speed = SPEED_1000;
- if (estatus & (ESTATUS_1000_XFULL | ESTATUS_1000_TFULL))
- phydev->duplex = DUPLEX_FULL;
- }
-
} else {
u32 bmcr = phy_read(phydev, MDIO_DEVAD_NONE, MII_BMCR);
@@ -401,10 +384,6 @@ int genphy_config(struct phy_device *phydev)
features |= SUPPORTED_1000baseT_Full;
if (val & ESTATUS_1000_THALF)
features |= SUPPORTED_1000baseT_Half;
- if (val & ESTATUS_1000_XFULL)
- features |= SUPPORTED_1000baseX_Full;
- if (val & ESTATUS_1000_XHALF)
- features |= SUPPORTED_1000baseX_Full;
}
phydev->supported = features;
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index f6dbdb0..fcb20fe 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -580,8 +580,6 @@ enum ethtool_sfeatures_retval_bits {
#define SUPPORTED_10000baseKX4_Full (1 << 18)
#define SUPPORTED_10000baseKR_Full (1 << 19)
#define SUPPORTED_10000baseR_FEC (1 << 20)
-#define SUPPORTED_1000baseX_Half (1 << 21)
-#define SUPPORTED_1000baseX_Full (1 << 22)
/* Indicates what features are advertised by the interface. */
#define ADVERTISED_10baseT_Half (1 << 0)
@@ -605,8 +603,6 @@ enum ethtool_sfeatures_retval_bits {
#define ADVERTISED_10000baseKX4_Full (1 << 18)
#define ADVERTISED_10000baseKR_Full (1 << 19)
#define ADVERTISED_10000baseR_FEC (1 << 20)
-#define ADVERTISED_1000baseX_Half (1 << 21)
-#define ADVERTISED_1000baseX_Full (1 << 22)
/* The following are all involved in forcing a particular link
* mode for the device for setting things. When getting the
diff --git a/include/linux/mii.h b/include/linux/mii.h
index 66b83d8..8b92692 100644
--- a/include/linux/mii.h
+++ b/include/linux/mii.h
@@ -115,8 +115,6 @@
#define EXPANSION_MFAULTS 0x0010 /* Multiple faults detected */
#define EXPANSION_RESV 0xffe0 /* Unused... */
-#define ESTATUS_1000_XFULL 0x8000 /* Can do 1000BX Full */
-#define ESTATUS_1000_XHALF 0x4000 /* Can do 1000BX Half */
#define ESTATUS_1000_TFULL 0x2000 /* Can do 1000BT Full */
#define ESTATUS_1000_THALF 0x1000 /* Can do 1000BT Half */
--
1.8.1.2
More information about the U-Boot
mailing list