summaryrefslogtreecommitdiff
path: root/drivers/net/phy
diff options
context:
space:
mode:
authorSascha Silbe <t-uboot@infra-silbe.de>2013-07-19 12:25:10 +0200
committerTom Rini <trini@ti.com>2013-07-19 17:12:16 -0400
commit9ba30f6bc2741ae4d49724cdd32ca1c9a48f6155 (patch)
tree5c18b2df8622e1d210f76bf37b3492410ce72ad2 /drivers/net/phy
parent971c450a446a60daf276b9d2adf243be6048c421 (diff)
downloadu-boot-imx-9ba30f6bc2741ae4d49724cdd32ca1c9a48f6155.zip
u-boot-imx-9ba30f6bc2741ae4d49724cdd32ca1c9a48f6155.tar.gz
u-boot-imx-9ba30f6bc2741ae4d49724cdd32ca1c9a48f6155.tar.bz2
phy: fix 10/100Mbps operation on 1Gbps-capable links
de1d786 [add support for Xilinx 1000BASE-X phy (GTX)] introduced a check for the extended status register in order to support 1Gbps-capable PHYs that don't have the 1000BASE-T registers. Since Extended Status only indicates what the PHY (i.e. the local side) is capable of, this broke communication with non-1Gbps peers. Only check the extended status if the 1000BASE-T registers are actually missing so we don't end up setting speed to 1Gbps even though the previous test (for the combination of local and peer support for 1Gbps) already indicated we can't do 1Gbps with the current peer. Signed-off-by: Sascha Silbe <t-uboot@infra-silbe.de> Tested-by: Fabio Estevam <fabio.estevam@freescale.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r--drivers/net/phy/phy.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 7c0eaec..4ea7481 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -333,7 +333,15 @@ int genphy_parse_link(struct phy_device *phydev)
} else if (lpa & LPA_10FULL)
phydev->duplex = DUPLEX_FULL;
- if (mii_reg & BMSR_ESTATEN)
+ /*
+ * Extended status may indicate that the PHY supports
+ * 1000BASE-T/X even though the 1000BASE-T registers
+ * are missing. In this case we can't tell whether the
+ * peer also supports it, so we only check extended
+ * status if the 1000BASE-T registers are actually
+ * missing.
+ */
+ if ((mii_reg & BMSR_ESTATEN) && !(mii_reg & BMSR_ERCAP))
estatus = phy_read(phydev, MDIO_DEVAD_NONE,
MII_ESTATUS);