linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Corentin Labbe <clabbe@baylibre.com>
To: andrew@lunn.ch, davem@davemloft.net, f.fainelli@gmail.com,
	fugang.duan@nxp.com
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	Corentin Labbe <clabbe@baylibre.com>
Subject: [PATCH] net: ethernet: fec: Add missing SPEED_
Date: Thu, 18 Oct 2018 15:05:00 +0000	[thread overview]
Message-ID: <1539875100-11121-1-git-send-email-clabbe@baylibre.com> (raw)

Since commit 58056c1e1b0e ("net: ethernet: Use phy_set_max_speed() to limit advertised speed"), the fec driver is unable to get any link.
This is due to missing SPEED_.

Fixes: 58056c1e1b0e ("net: ethernet: Use phy_set_max_speed() to limit advertised speed")
Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
---
 drivers/net/ethernet/freescale/fec_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index a17cc97..75fd7c9 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -1946,7 +1946,7 @@ static int fec_enet_mii_probe(struct net_device *ndev)
 
 	/* mask with MAC supported features */
 	if (fep->quirks & FEC_QUIRK_HAS_GBIT) {
-		phy_set_max_speed(phy_dev, 1000);
+		phy_set_max_speed(phy_dev, SPEED_1000);
 		phy_remove_link_mode(phy_dev,
 				     ETHTOOL_LINK_MODE_1000baseT_Half_BIT);
 #if !defined(CONFIG_M5272)
@@ -1954,7 +1954,7 @@ static int fec_enet_mii_probe(struct net_device *ndev)
 #endif
 	}
 	else
-		phy_set_max_speed(phy_dev, 100);
+		phy_set_max_speed(phy_dev, SPEED_100);
 
 	fep->link = 0;
 	fep->full_duplex = 0;
-- 
2.7.4


             reply	other threads:[~2018-10-18 15:05 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-18 15:05 Corentin Labbe [this message]
2018-10-18 18:39 ` [PATCH] net: ethernet: fec: Add missing SPEED_ Florian Fainelli
2018-10-18 18:47   ` LABBE Corentin
2018-10-18 18:55     ` Florian Fainelli
2018-10-18 19:16       ` LABBE Corentin
2018-10-18 19:38         ` Florian Fainelli
2018-10-18 19:59           ` LABBE Corentin
2018-10-18 20:10             ` Florian Fainelli
2018-10-18 20:41               ` Heiner Kallweit
2018-10-19  7:07                 ` Andy Duan
2018-10-20 15:39                 ` Andrew Lunn
2018-10-20 15:51                   ` Heiner Kallweit
2018-10-20 18:59                     ` Andrew Lunn
2018-10-20 19:26                       ` Heiner Kallweit
2018-10-20 20:12                         ` Andrew Lunn
2018-10-20 20:32             ` Andrew Lunn
2018-10-19 14:42           ` LABBE Corentin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1539875100-11121-1-git-send-email-clabbe@baylibre.com \
    --to=clabbe@baylibre.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=fugang.duan@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).