netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steen Hegelund <steen.hegelund@microchip.com>
To: Russell King <linux@armlinux.org.uk>,
	Andrew Lunn <andrew@lunn.ch>,
	"Heiner Kallweit" <hkallweit1@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Cc: Steen Hegelund <steen.hegelund@microchip.com>,
	Bjarni Jonasson <bjarni.jonasson@microchip.com>
Subject: [PATCH net-next 3/4] net: sfp: add support for 25G BASE-R SFPs
Date: Fri, 11 Jun 2021 14:54:52 +0200	[thread overview]
Message-ID: <20210611125453.313308-4-steen.hegelund@microchip.com> (raw)
In-Reply-To: <20210611125453.313308-1-steen.hegelund@microchip.com>

Add support for 25gbase-r modules. This is needed for the Sparx5 switch.

Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com>
Signed-off-by: Bjarni Jonasson <bjarni.jonasson@microchip.com>
---
 drivers/net/phy/sfp-bus.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/phy/sfp-bus.c b/drivers/net/phy/sfp-bus.c
index e61de66e973b..1db9cea13690 100644
--- a/drivers/net/phy/sfp-bus.c
+++ b/drivers/net/phy/sfp-bus.c
@@ -392,6 +392,11 @@ EXPORT_SYMBOL_GPL(sfp_parse_support);
 phy_interface_t sfp_select_interface(struct sfp_bus *bus,
 				     unsigned long *link_modes)
 {
+	if (phylink_test(link_modes, 25000baseCR_Full) ||
+	    phylink_test(link_modes, 25000baseKR_Full) ||
+	    phylink_test(link_modes, 25000baseSR_Full))
+		return PHY_INTERFACE_MODE_25GBASER;
+
 	if (phylink_test(link_modes, 10000baseCR_Full) ||
 	    phylink_test(link_modes, 10000baseSR_Full) ||
 	    phylink_test(link_modes, 10000baseLR_Full) ||
-- 
2.32.0


  parent reply	other threads:[~2021-06-11 12:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-11 12:54 [PATCH net-next 0/4] Add 25G BASE-R support Steen Hegelund
2021-06-11 12:54 ` [PATCH net-next 1/4] dt-bindings: net: Add 25G BASE-R phy interface Steen Hegelund
2021-06-12 18:05   ` Andrew Lunn
2021-06-12 18:52   ` Russell King (Oracle)
2021-06-11 12:54 ` [PATCH net-next 2/4] net: phy: Add 25G BASE-R interface mode Steen Hegelund
2021-06-12 18:06   ` Andrew Lunn
2021-06-12 18:52   ` Russell King (Oracle)
2021-06-11 12:54 ` Steen Hegelund [this message]
2021-06-12 18:07   ` [PATCH net-next 3/4] net: sfp: add support for 25G BASE-R SFPs Andrew Lunn
2021-06-12 18:53   ` Russell King (Oracle)
2021-06-11 12:54 ` [PATCH net-next 4/4] net: phylink: Add 25G BASE-R support Steen Hegelund
2021-06-12 18:07   ` Andrew Lunn
2021-06-12 18:54   ` Russell King (Oracle)
2021-06-12 20:20 ` [PATCH net-next 0/4] " patchwork-bot+netdevbpf

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=20210611125453.313308-4-steen.hegelund@microchip.com \
    --to=steen.hegelund@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=bjarni.jonasson@microchip.com \
    --cc=davem@davemloft.net \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --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).