* [PATCH net-next v2 0/2] Add 100 base-x mode
@ 2021-01-13 11:56 Bjarni Jonasson
2021-01-13 11:56 ` [PATCH net-next v2 1/2] net: phy: " Bjarni Jonasson
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Bjarni Jonasson @ 2021-01-13 11:56 UTC (permalink / raw)
To: Russell King, Andrew Lunn, Heiner Kallweit, David S. Miller,
Jakub Kicinski
Cc: Bjarni Jonasson, netdev, linux-kernel, UNGLinuxDriver
Adding support for 100 base-x in phylink.
The Sparx5 switch supports 100 base-x pcs (IEEE 802.3 Clause 24) 4b5b encoded.
These patches adds phylink support for that mode.
Tested in Sparx5, using sfp modules:
Axcen 100fx AXFE-1314-0521 (base-fx)
Axcen 100lx AXFE-1314-0551 (base-lx)
HP SFP 100FX J9054C (bx-10)
Excom SFP-SX-M1002 (base-lx)
v1 -> v2:
Added description to Documentation/networking/phy.rst
Moved PHY_INTERFACE_MODE_100BASEX to above 1000BASEX
Patching against net-next
Bjarni Jonasson (2):
net: phy: Add 100 base-x mode
sfp: add support for 100 base-x SFPs
Documentation/networking/phy.rst | 5 +++++
drivers/net/phy/sfp-bus.c | 9 +++++++++
include/linux/phy.h | 4 ++++
3 files changed, 18 insertions(+)
--
2.17.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH net-next v2 1/2] net: phy: Add 100 base-x mode
2021-01-13 11:56 [PATCH net-next v2 0/2] Add 100 base-x mode Bjarni Jonasson
@ 2021-01-13 11:56 ` Bjarni Jonasson
2021-01-14 15:13 ` Russell King - ARM Linux admin
2021-01-13 11:56 ` [PATCH net-next v2 2/2] sfp: add support for 100 base-x SFPs Bjarni Jonasson
2021-01-15 0:10 ` [PATCH net-next v2 0/2] Add 100 base-x mode patchwork-bot+netdevbpf
2 siblings, 1 reply; 6+ messages in thread
From: Bjarni Jonasson @ 2021-01-13 11:56 UTC (permalink / raw)
To: Russell King, Andrew Lunn, Heiner Kallweit, David S. Miller,
Jakub Kicinski
Cc: Bjarni Jonasson, netdev, linux-kernel, UNGLinuxDriver
Sparx-5 supports this mode and it is missing in the PHY core.
Signed-off-by: Bjarni Jonasson <bjarni.jonasson@microchip.com>
---
Documentation/networking/phy.rst | 5 +++++
include/linux/phy.h | 4 ++++
2 files changed, 9 insertions(+)
diff --git a/Documentation/networking/phy.rst b/Documentation/networking/phy.rst
index b2f7ec794bc8..399f17976a6c 100644
--- a/Documentation/networking/phy.rst
+++ b/Documentation/networking/phy.rst
@@ -286,6 +286,11 @@ Some of the interface modes are described below:
Note: due to legacy usage, some 10GBASE-R usage incorrectly makes
use of this definition.
+``PHY_INTERFACE_MODE_100BASEX``
+ This defines IEEE 802.3 Clause 24. The link operates at a fixed data
+ rate of 125Mpbs using a 4B/5B encoding scheme, resulting in an underlying
+ data rate of 100Mpbs.
+
Pause frames / flow control
===========================
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 9effb511acde..24fcc6456a9e 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -104,6 +104,7 @@ extern const int phy_10gbit_features_array[1];
* @PHY_INTERFACE_MODE_MOCA: Multimedia over Coax
* @PHY_INTERFACE_MODE_QSGMII: Quad SGMII
* @PHY_INTERFACE_MODE_TRGMII: Turbo RGMII
+ * @PHY_INTERFACE_MODE_100BASEX: 100 BaseX
* @PHY_INTERFACE_MODE_1000BASEX: 1000 BaseX
* @PHY_INTERFACE_MODE_2500BASEX: 2500 BaseX
* @PHY_INTERFACE_MODE_RXAUI: Reduced XAUI
@@ -135,6 +136,7 @@ typedef enum {
PHY_INTERFACE_MODE_MOCA,
PHY_INTERFACE_MODE_QSGMII,
PHY_INTERFACE_MODE_TRGMII,
+ PHY_INTERFACE_MODE_100BASEX,
PHY_INTERFACE_MODE_1000BASEX,
PHY_INTERFACE_MODE_2500BASEX,
PHY_INTERFACE_MODE_RXAUI,
@@ -217,6 +219,8 @@ static inline const char *phy_modes(phy_interface_t interface)
return "usxgmii";
case PHY_INTERFACE_MODE_10GKR:
return "10gbase-kr";
+ case PHY_INTERFACE_MODE_100BASEX:
+ return "100base-x";
default:
return "unknown";
}
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH net-next v2 2/2] sfp: add support for 100 base-x SFPs
2021-01-13 11:56 [PATCH net-next v2 0/2] Add 100 base-x mode Bjarni Jonasson
2021-01-13 11:56 ` [PATCH net-next v2 1/2] net: phy: " Bjarni Jonasson
@ 2021-01-13 11:56 ` Bjarni Jonasson
2021-01-14 15:14 ` Russell King - ARM Linux admin
2021-01-15 0:10 ` [PATCH net-next v2 0/2] Add 100 base-x mode patchwork-bot+netdevbpf
2 siblings, 1 reply; 6+ messages in thread
From: Bjarni Jonasson @ 2021-01-13 11:56 UTC (permalink / raw)
To: Russell King, Andrew Lunn, Heiner Kallweit, David S. Miller,
Jakub Kicinski
Cc: Bjarni Jonasson, netdev, linux-kernel, UNGLinuxDriver
Add support for 100Base-FX, 100Base-LX, 100Base-PX and 100Base-BX10 modules
This is needed for Sparx-5 switch.
Signed-off-by: Bjarni Jonasson <bjarni.jonasson@microchip.com>
---
drivers/net/phy/sfp-bus.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/net/phy/sfp-bus.c b/drivers/net/phy/sfp-bus.c
index cdfa0a190962..3c67ad9951ab 100644
--- a/drivers/net/phy/sfp-bus.c
+++ b/drivers/net/phy/sfp-bus.c
@@ -265,6 +265,12 @@ void sfp_parse_support(struct sfp_bus *bus, const struct sfp_eeprom_id *id,
br_min <= 1300 && br_max >= 1200)
phylink_set(modes, 1000baseX_Full);
+ /* 100Base-FX, 100Base-LX, 100Base-PX, 100Base-BX10 */
+ if (id->base.e100_base_fx || id->base.e100_base_lx)
+ phylink_set(modes, 100baseFX_Full);
+ if ((id->base.e_base_px || id->base.e_base_bx10) && br_nom == 100)
+ phylink_set(modes, 100baseFX_Full);
+
/* For active or passive cables, select the link modes
* based on the bit rates and the cable compliance bytes.
*/
@@ -389,6 +395,9 @@ phy_interface_t sfp_select_interface(struct sfp_bus *bus,
if (phylink_test(link_modes, 1000baseX_Full))
return PHY_INTERFACE_MODE_1000BASEX;
+ if (phylink_test(link_modes, 100baseFX_Full))
+ return PHY_INTERFACE_MODE_100BASEX;
+
dev_warn(bus->sfp_dev, "Unable to ascertain link mode\n");
return PHY_INTERFACE_MODE_NA;
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net-next v2 1/2] net: phy: Add 100 base-x mode
2021-01-13 11:56 ` [PATCH net-next v2 1/2] net: phy: " Bjarni Jonasson
@ 2021-01-14 15:13 ` Russell King - ARM Linux admin
0 siblings, 0 replies; 6+ messages in thread
From: Russell King - ARM Linux admin @ 2021-01-14 15:13 UTC (permalink / raw)
To: Bjarni Jonasson
Cc: Andrew Lunn, Heiner Kallweit, David S. Miller, Jakub Kicinski,
netdev, linux-kernel, UNGLinuxDriver
On Wed, Jan 13, 2021 at 12:56:25PM +0100, Bjarni Jonasson wrote:
> Sparx-5 supports this mode and it is missing in the PHY core.
>
> Signed-off-by: Bjarni Jonasson <bjarni.jonasson@microchip.com>
Reviewed-by: Russell King <rmk+kernel@armlinux.org.uk>
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next v2 2/2] sfp: add support for 100 base-x SFPs
2021-01-13 11:56 ` [PATCH net-next v2 2/2] sfp: add support for 100 base-x SFPs Bjarni Jonasson
@ 2021-01-14 15:14 ` Russell King - ARM Linux admin
0 siblings, 0 replies; 6+ messages in thread
From: Russell King - ARM Linux admin @ 2021-01-14 15:14 UTC (permalink / raw)
To: Bjarni Jonasson
Cc: Andrew Lunn, Heiner Kallweit, David S. Miller, Jakub Kicinski,
netdev, linux-kernel, UNGLinuxDriver
On Wed, Jan 13, 2021 at 12:56:26PM +0100, Bjarni Jonasson wrote:
> Add support for 100Base-FX, 100Base-LX, 100Base-PX and 100Base-BX10 modules
> This is needed for Sparx-5 switch.
>
> Signed-off-by: Bjarni Jonasson <bjarni.jonasson@microchip.com>
Reviewed-by: Russell King <rmk+kernel@armlinux.org.uk>
Thanks!
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next v2 0/2] Add 100 base-x mode
2021-01-13 11:56 [PATCH net-next v2 0/2] Add 100 base-x mode Bjarni Jonasson
2021-01-13 11:56 ` [PATCH net-next v2 1/2] net: phy: " Bjarni Jonasson
2021-01-13 11:56 ` [PATCH net-next v2 2/2] sfp: add support for 100 base-x SFPs Bjarni Jonasson
@ 2021-01-15 0:10 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-01-15 0:10 UTC (permalink / raw)
To: Bjarni Jonasson
Cc: linux, andrew, hkallweit1, davem, kuba, netdev, linux-kernel,
UNGLinuxDriver
Hello:
This series was applied to netdev/net-next.git (refs/heads/master):
On Wed, 13 Jan 2021 12:56:24 +0100 you wrote:
> Adding support for 100 base-x in phylink.
> The Sparx5 switch supports 100 base-x pcs (IEEE 802.3 Clause 24) 4b5b encoded.
> These patches adds phylink support for that mode.
>
> Tested in Sparx5, using sfp modules:
> Axcen 100fx AXFE-1314-0521 (base-fx)
> Axcen 100lx AXFE-1314-0551 (base-lx)
> HP SFP 100FX J9054C (bx-10)
> Excom SFP-SX-M1002 (base-lx)
>
> [...]
Here is the summary with links:
- [net-next,v2,1/2] net: phy: Add 100 base-x mode
https://git.kernel.org/netdev/net-next/c/b1ae3587d16a
- [net-next,v2,2/2] sfp: add support for 100 base-x SFPs
https://git.kernel.org/netdev/net-next/c/6e12f35cef6b
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-01-15 0:11 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-13 11:56 [PATCH net-next v2 0/2] Add 100 base-x mode Bjarni Jonasson
2021-01-13 11:56 ` [PATCH net-next v2 1/2] net: phy: " Bjarni Jonasson
2021-01-14 15:13 ` Russell King - ARM Linux admin
2021-01-13 11:56 ` [PATCH net-next v2 2/2] sfp: add support for 100 base-x SFPs Bjarni Jonasson
2021-01-14 15:14 ` Russell King - ARM Linux admin
2021-01-15 0:10 ` [PATCH net-next v2 0/2] Add 100 base-x mode patchwork-bot+netdevbpf
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).