* [PATCH net-next] net: sfp: extend bitrate-derived mode for 2500BASE-X
@ 2021-01-10 10:58 Russell King
2021-01-10 16:49 ` Andrew Lunn
0 siblings, 1 reply; 3+ messages in thread
From: Russell King @ 2021-01-10 10:58 UTC (permalink / raw)
To: Andrew Lunn, Heiner Kallweit; +Cc: David S. Miller, netdev, Jakub Kicinski
Extend the bitrate-derived support to include 2500BASE-X for modules
that report a bitrate of 2500Mbaud.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
drivers/net/phy/sfp-bus.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/net/phy/sfp-bus.c b/drivers/net/phy/sfp-bus.c
index 20b91f5dfc6e..cdfa0a190962 100644
--- a/drivers/net/phy/sfp-bus.c
+++ b/drivers/net/phy/sfp-bus.c
@@ -337,11 +337,16 @@ void sfp_parse_support(struct sfp_bus *bus, const struct sfp_eeprom_id *id,
* the bitrate to determine supported modes. Some BiDi modules (eg,
* 1310nm/1550nm) are not 1000BASE-BX compliant due to the differing
* wavelengths, so do not set any transceiver bits.
+ *
+ * Do the same for modules supporting 2500BASE-X. Note that some
+ * modules use 2500Mbaud rather than 3100 or 3200Mbaud for
+ * 2500BASE-X, so we allow some slack here.
*/
- if (bitmap_empty(modes, __ETHTOOL_LINK_MODE_MASK_NBITS)) {
- /* If the bit rate allows 1000baseX */
- if (br_nom && br_min <= 1300 && br_max >= 1200)
+ if (bitmap_empty(modes, __ETHTOOL_LINK_MODE_MASK_NBITS) && br_nom) {
+ if (br_min <= 1300 && br_max >= 1200)
phylink_set(modes, 1000baseX_Full);
+ if (br_min <= 3200 && br_max >= 2500)
+ phylink_set(modes, 2500baseX_Full);
}
if (bus->sfp_quirk)
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: sfp: extend bitrate-derived mode for 2500BASE-X
2021-01-10 10:58 [PATCH net-next] net: sfp: extend bitrate-derived mode for 2500BASE-X Russell King
@ 2021-01-10 16:49 ` Andrew Lunn
2021-01-12 0:19 ` Jakub Kicinski
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Lunn @ 2021-01-10 16:49 UTC (permalink / raw)
To: Russell King; +Cc: Heiner Kallweit, David S. Miller, netdev, Jakub Kicinski
On Sun, Jan 10, 2021 at 10:58:37AM +0000, Russell King wrote:
> Extend the bitrate-derived support to include 2500BASE-X for modules
> that report a bitrate of 2500Mbaud.
>
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: sfp: extend bitrate-derived mode for 2500BASE-X
2021-01-10 16:49 ` Andrew Lunn
@ 2021-01-12 0:19 ` Jakub Kicinski
0 siblings, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2021-01-12 0:19 UTC (permalink / raw)
To: Andrew Lunn, Russell King; +Cc: Heiner Kallweit, David S. Miller, netdev
On Sun, 10 Jan 2021 17:49:54 +0100 Andrew Lunn wrote:
> On Sun, Jan 10, 2021 at 10:58:37AM +0000, Russell King wrote:
> > Extend the bitrate-derived support to include 2500BASE-X for modules
> > that report a bitrate of 2500Mbaud.
> >
> > Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
>
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Applied, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-01-12 0:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-10 10:58 [PATCH net-next] net: sfp: extend bitrate-derived mode for 2500BASE-X Russell King
2021-01-10 16:49 ` Andrew Lunn
2021-01-12 0:19 ` Jakub Kicinski
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.