summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/arc/emac_main.c
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2013-12-05 14:52:15 -0800
committerDavid S. Miller <davem@davemloft.net>2013-12-06 14:57:21 -0500
commitb0ac9564061265dd14e6f8f777622e3401b82b4b (patch)
tree390b78ca15d01a6914252a2276774e94dc20a10e /drivers/net/ethernet/arc/emac_main.c
parent8fdade4be755af17a3d205d07f594f939f173504 (diff)
downloadblackbird-op-linux-b0ac9564061265dd14e6f8f777622e3401b82b4b.tar.gz
blackbird-op-linux-b0ac9564061265dd14e6f8f777622e3401b82b4b.zip
arc_emac: remove custom "max-speed" parsing code
The ARC emac driver was the only in-tree to parse a PHY device 'max-speed' property but yet failed to do it correctly because 'max-speed' is supposed to set a PHY device supported features, not the advertising features as it was done. Now that of_mdiobus_register() takes care of doing that, remove the custom 'max-speed' parsing code. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/arc/emac_main.c')
-rw-r--r--drivers/net/ethernet/arc/emac_main.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/drivers/net/ethernet/arc/emac_main.c b/drivers/net/ethernet/arc/emac_main.c
index b2ffad1304d2..eedf2a5fc2be 100644
--- a/drivers/net/ethernet/arc/emac_main.c
+++ b/drivers/net/ethernet/arc/emac_main.c
@@ -381,17 +381,7 @@ static int arc_emac_open(struct net_device *ndev)
phy_dev->autoneg = AUTONEG_ENABLE;
phy_dev->speed = 0;
phy_dev->duplex = 0;
- phy_dev->advertising = phy_dev->supported;
-
- if (priv->max_speed > 100) {
- phy_dev->advertising &= PHY_GBIT_FEATURES;
- } else if (priv->max_speed <= 100) {
- phy_dev->advertising &= PHY_BASIC_FEATURES;
- if (priv->max_speed <= 10) {
- phy_dev->advertising &= ~SUPPORTED_100baseT_Half;
- phy_dev->advertising &= ~SUPPORTED_100baseT_Full;
- }
- }
+ phy_dev->advertising &= phy_dev->supported;
priv->last_rx_bd = 0;
@@ -704,14 +694,6 @@ static int arc_emac_probe(struct platform_device *pdev)
/* Set poll rate so that it polls every 1 ms */
arc_reg_set(priv, R_POLLRATE, clock_frequency / 1000000);
- /* Get max speed of operation from device tree */
- if (of_property_read_u32(pdev->dev.of_node, "max-speed",
- &priv->max_speed)) {
- dev_err(&pdev->dev, "failed to retrieve <max-speed> from device tree\n");
- err = -EINVAL;
- goto out;
- }
-
ndev->irq = irq;
dev_info(&pdev->dev, "IRQ is %d\n", ndev->irq);
OpenPOWER on IntegriCloud