netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: davem@davemloft.net, linux@armlinux.org.uk,
	alexandre.belloni@bootlin.com
Cc: andrew@lunn.ch, f.fainelli@gmail.com, vivien.didelot@gmail.com,
	joergen.andreasen@microchip.com, allan.nielsen@microchip.com,
	horatiu.vultur@microchip.com, claudiu.manoil@nxp.com,
	alexandru.marginean@nxp.com, xiaoliang.yang_1@nxp.com,
	yangbo.lu@nxp.com, netdev@vger.kernel.org,
	Vladimir Oltean <vladimir.oltean@nxp.com>
Subject: [PATCH net-next 1/2] net: mscc: ocelot: treat SPEED_UNKNOWN as SPEED_10
Date: Mon, 18 Nov 2019 20:10:29 +0200	[thread overview]
Message-ID: <20191118181030.23921-2-olteanv@gmail.com> (raw)
In-Reply-To: <20191118181030.23921-1-olteanv@gmail.com>

From: Vladimir Oltean <vladimir.oltean@nxp.com>

One can claim there may be a power consumption gain for ports with no
carrier, but the main benefit of this patch is getting rid of this
warning message when unplugging a cable:

Unsupported PHY speed on port 0: -1

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 drivers/net/ethernet/mscc/ocelot.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/mscc/ocelot.c b/drivers/net/ethernet/mscc/ocelot.c
index 90c46ba763d7..7fd85767aa8e 100644
--- a/drivers/net/ethernet/mscc/ocelot.c
+++ b/drivers/net/ethernet/mscc/ocelot.c
@@ -413,6 +413,7 @@ void ocelot_adjust_link(struct ocelot *ocelot, int port,
 	int speed, mode = 0;
 
 	switch (phydev->speed) {
+	case SPEED_UNKNOWN:
 	case SPEED_10:
 		speed = OCELOT_SPEED_10;
 		break;
-- 
2.17.1


  reply	other threads:[~2019-11-18 18:13 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-18 18:10 [PATCH net-next 0/2] Convert Ocelot and Felix switches to PHYLINK Vladimir Oltean
2019-11-18 18:10 ` Vladimir Oltean [this message]
2019-11-18 18:10 ` [PATCH net-next 2/2] net: mscc: ocelot: convert " Vladimir Oltean
2019-11-19 23:25   ` Russell King - ARM Linux admin
2019-11-18 23:13 ` [PATCH net-next 0/2] Convert Ocelot and Felix switches " Horatiu Vultur
2019-11-19 12:42   ` Vladimir Oltean
2019-11-19 20:48     ` Horatiu Vultur
2019-11-19 20:53       ` Vladimir Oltean
2019-11-19 21:42       ` Andrew Lunn
2019-11-20 12:08         ` Horatiu Vultur
2019-11-20 13:13           ` Vladimir Oltean
2019-11-20 23:21             ` Horatiu Vultur
2019-11-21  0:18               ` Andrew Lunn
2019-11-22 19:30                 ` Horatiu Vultur
2019-11-21 17:51               ` Vladimir Oltean
2019-11-22 19:45                 ` Horatiu Vultur
2019-11-19 23:11 ` David Miller

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=20191118181030.23921-2-olteanv@gmail.com \
    --to=olteanv@gmail.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=alexandru.marginean@nxp.com \
    --cc=allan.nielsen@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=horatiu.vultur@microchip.com \
    --cc=joergen.andreasen@microchip.com \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@gmail.com \
    --cc=vladimir.oltean@nxp.com \
    --cc=xiaoliang.yang_1@nxp.com \
    --cc=yangbo.lu@nxp.com \
    /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).