All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: David Miller <davem@davemloft.net>
Cc: netdev <netdev@vger.kernel.org>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Andrew Lunn <andrew@lunn.ch>
Subject: [PATCH v3 net-next 05/12] net: bcmgenet: Fix speed selection for reverse MII
Date: Wed, 12 Sep 2018 01:53:12 +0200	[thread overview]
Message-ID: <1536709999-13420-6-git-send-email-andrew@lunn.ch> (raw)
In-Reply-To: <1536709999-13420-1-git-send-email-andrew@lunn.ch>

The phy supported speed is being used to determine if the MAC should
be configured to 100 or 1G. The masking logic is broken. Instead, look
at 1G supported speeds to enable 1G MAC support.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
---
v3:
Add missing at in commit message
Change subject requested by Florian
---
 drivers/net/ethernet/broadcom/genet/bcmmii.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/genet/bcmmii.c b/drivers/net/ethernet/broadcom/genet/bcmmii.c
index b11d58f1bf45..b756fc79424e 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmmii.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmmii.c
@@ -226,11 +226,10 @@ int bcmgenet_mii_config(struct net_device *dev, bool init)
 		 * capabilities, use that knowledge to also configure the
 		 * Reverse MII interface correctly.
 		 */
-		if ((dev->phydev->supported & PHY_BASIC_FEATURES) ==
-				PHY_BASIC_FEATURES)
-			port_ctrl = PORT_MODE_EXT_RVMII_25;
-		else
+		if (dev->phydev->supported & PHY_1000BT_FEATURES)
 			port_ctrl = PORT_MODE_EXT_RVMII_50;
+		else
+			port_ctrl = PORT_MODE_EXT_RVMII_25;
 		bcmgenet_sys_writel(priv, port_ctrl, SYS_PORT_CTRL);
 		break;
 
-- 
2.19.0.rc1

  parent reply	other threads:[~2018-09-12  4:57 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-11 23:53 [PATCH v3 net-next 00/12] Preparing for phylib limkmodes Andrew Lunn
2018-09-11 23:53 ` [PATCH v3 net-next 01/12] net: phy: ste10Xp: Remove wrong SUPPORTED_Pause Andrew Lunn
2018-09-11 23:53 ` [PATCH v3 net-next 02/12] net: phy: et1011c: Remove incorrect missing 1000 Half Andrew Lunn
2018-09-11 23:53 ` [PATCH v3 net-next 03/12] net: phy: bcm63xx: Allow to be built with COMPILE_TEST Andrew Lunn
2018-09-11 23:53 ` [PATCH v3 net-next 04/12] net: ethernet: Use phy_set_max_speed() to limit advertised speed Andrew Lunn
2018-11-22 10:40   ` Anssi Hannula
2018-11-22 18:33     ` Andrew Lunn
2018-09-11 23:53 ` Andrew Lunn [this message]
2018-09-11 23:53 ` [PATCH v3 net-next 06/12] net: ethernet: Fix up drivers masking pause support Andrew Lunn
2018-09-11 23:53 ` [PATCH v3 net-next 07/12] net: ethernet: Add helper to remove a supported link mode Andrew Lunn
2018-09-17 15:13   ` Simon Horman
2018-09-17 15:38     ` Andrew Lunn
2018-09-18 10:58       ` Simon Horman
2018-09-18 13:02         ` Andrew Lunn
2018-09-19  7:45           ` Simon Horman
2018-09-19 12:32             ` Andrew Lunn
2018-09-20  8:05               ` Simon Horman
2018-09-20 12:51                 ` Andrew Lunn
2018-09-21  8:17                   ` Simon Horman
2018-09-24 15:36                     ` Simon Horman
2018-09-24 15:50                       ` Andrew Lunn
2018-09-25  7:38                         ` Simon Horman
2018-09-27  3:08                         ` David Miller
2018-10-01 12:43                           ` Simon Horman
2018-09-20 13:25         ` Andrew Lunn
2018-09-21  8:13           ` Simon Horman
2018-09-21 13:01             ` Andrew Lunn
2018-09-25  8:40               ` Simon Horman
2018-09-11 23:53 ` [PATCH v3 net-next 08/12] net: ethernet: Add helper for MACs which support asym pause Andrew Lunn
2018-09-11 23:53 ` [PATCH v3 net-next 09/12] net: ethernet: Add helper for MACs which support pause Andrew Lunn
2018-09-11 23:53 ` [PATCH v3 net-next 10/12] net: ethernet: Add helper for set_pauseparam for Asym Pause Andrew Lunn
2018-09-11 23:53 ` [PATCH v3 net-next 11/12] net: ethernet: Add helper for set_pauseparam for Pause Andrew Lunn
2018-09-11 23:53 ` [PATCH v3 net-next 12/12] net: ethernet: Add helper to determine if pause configuration is supported Andrew Lunn
2018-09-13  3:24 ` [PATCH v3 net-next 00/12] Preparing for phylib limkmodes 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=1536709999-13420-6-git-send-email-andrew@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.