All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/2] Add 100 base-x mode
@ 2021-01-11 13:06 Bjarni Jonasson
  2021-01-11 13:06 ` [PATCH v1 1/2] net: phy: " Bjarni Jonasson
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Bjarni Jonasson @ 2021-01-11 13:06 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 
Cisco GLC-FE-100LX
HP SFP 100FX J9054C
Excom SFP-SX-M1002

Bjarni Jonasson (2):
  net: phy: Add 100 base-x mode
  sfp: add support for 100 base-x SFPs

 drivers/net/phy/sfp-bus.c | 9 +++++++++
 include/linux/phy.h       | 4 ++++
 2 files changed, 13 insertions(+)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v1 1/2] net: phy: Add 100 base-x mode
  2021-01-11 13:06 [PATCH v1 0/2] Add 100 base-x mode Bjarni Jonasson
@ 2021-01-11 13:06 ` Bjarni Jonasson
  2021-01-11 14:19   ` Russell King - ARM Linux admin
                     ` (3 more replies)
  2021-01-11 13:06 ` [PATCH v1 2/2] sfp: add support for 100 base-x SFPs Bjarni Jonasson
  2021-01-11 14:18 ` [PATCH v1 0/2] Add 100 base-x mode Russell King - ARM Linux admin
  2 siblings, 4 replies; 16+ messages in thread
From: Bjarni Jonasson @ 2021-01-11 13:06 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>
---
 include/linux/phy.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/linux/phy.h b/include/linux/phy.h
index 56563e5e0dc7..dce867222d58 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -111,6 +111,7 @@ extern const int phy_10gbit_features_array[1];
  * @PHY_INTERFACE_MODE_10GBASER: 10G BaseR
  * @PHY_INTERFACE_MODE_USXGMII:  Universal Serial 10GE MII
  * @PHY_INTERFACE_MODE_10GKR: 10GBASE-KR - with Clause 73 AN
+ * @PHY_INTERFACE_MODE_100BASEX: 100 BaseX
  * @PHY_INTERFACE_MODE_MAX: Book keeping
  *
  * Describes the interface between the MAC and PHY.
@@ -144,6 +145,7 @@ typedef enum {
 	PHY_INTERFACE_MODE_USXGMII,
 	/* 10GBASE-KR - with Clause 73 AN */
 	PHY_INTERFACE_MODE_10GKR,
+	PHY_INTERFACE_MODE_100BASEX,
 	PHY_INTERFACE_MODE_MAX,
 } phy_interface_t;
 
@@ -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] 16+ messages in thread

* [PATCH v1 2/2] sfp: add support for 100 base-x SFPs
  2021-01-11 13:06 [PATCH v1 0/2] Add 100 base-x mode Bjarni Jonasson
  2021-01-11 13:06 ` [PATCH v1 1/2] net: phy: " Bjarni Jonasson
@ 2021-01-11 13:06 ` Bjarni Jonasson
  2021-01-11 14:22   ` Russell King - ARM Linux admin
  2021-01-11 14:18 ` [PATCH v1 0/2] Add 100 base-x mode Russell King - ARM Linux admin
  2 siblings, 1 reply; 16+ messages in thread
From: Bjarni Jonasson @ 2021-01-11 13:06 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 58014feedf6c..b2a9ee3dd28e 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.
 	 */
@@ -385,6 +391,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] 16+ messages in thread

* Re: [PATCH v1 0/2] Add 100 base-x mode
  2021-01-11 13:06 [PATCH v1 0/2] Add 100 base-x mode Bjarni Jonasson
  2021-01-11 13:06 ` [PATCH v1 1/2] net: phy: " Bjarni Jonasson
  2021-01-11 13:06 ` [PATCH v1 2/2] sfp: add support for 100 base-x SFPs Bjarni Jonasson
@ 2021-01-11 14:18 ` Russell King - ARM Linux admin
  2021-01-12 14:33   ` Bjarni Jonasson
  2 siblings, 1 reply; 16+ messages in thread
From: Russell King - ARM Linux admin @ 2021-01-11 14:18 UTC (permalink / raw)
  To: Bjarni Jonasson
  Cc: Andrew Lunn, Heiner Kallweit, David S. Miller, Jakub Kicinski,
	netdev, linux-kernel, UNGLinuxDriver

On Mon, Jan 11, 2021 at 02:06:55PM +0100, Bjarni Jonasson 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 
> Cisco GLC-FE-100LX
> HP SFP 100FX J9054C
> Excom SFP-SX-M1002

For each of these modules, please send me:

ethtool -m ethx raw on > module.bin

so I can validate future changes with these modules. 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] 16+ messages in thread

* Re: [PATCH v1 1/2] net: phy: Add 100 base-x mode
  2021-01-11 13:06 ` [PATCH v1 1/2] net: phy: " Bjarni Jonasson
@ 2021-01-11 14:19   ` Russell King - ARM Linux admin
  2021-01-11 14:26   ` Andrew Lunn
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 16+ messages in thread
From: Russell King - ARM Linux admin @ 2021-01-11 14:19 UTC (permalink / raw)
  To: Bjarni Jonasson
  Cc: Andrew Lunn, Heiner Kallweit, David S. Miller, Jakub Kicinski,
	netdev, linux-kernel, UNGLinuxDriver

On Mon, Jan 11, 2021 at 02:06:56PM +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>

Looks good, thanks.

Reviewed-by: Russell King <rmk+kernel@armlinux.org.uk>

> ---
>  include/linux/phy.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/include/linux/phy.h b/include/linux/phy.h
> index 56563e5e0dc7..dce867222d58 100644
> --- a/include/linux/phy.h
> +++ b/include/linux/phy.h
> @@ -111,6 +111,7 @@ extern const int phy_10gbit_features_array[1];
>   * @PHY_INTERFACE_MODE_10GBASER: 10G BaseR
>   * @PHY_INTERFACE_MODE_USXGMII:  Universal Serial 10GE MII
>   * @PHY_INTERFACE_MODE_10GKR: 10GBASE-KR - with Clause 73 AN
> + * @PHY_INTERFACE_MODE_100BASEX: 100 BaseX
>   * @PHY_INTERFACE_MODE_MAX: Book keeping
>   *
>   * Describes the interface between the MAC and PHY.
> @@ -144,6 +145,7 @@ typedef enum {
>  	PHY_INTERFACE_MODE_USXGMII,
>  	/* 10GBASE-KR - with Clause 73 AN */
>  	PHY_INTERFACE_MODE_10GKR,
> +	PHY_INTERFACE_MODE_100BASEX,
>  	PHY_INTERFACE_MODE_MAX,
>  } phy_interface_t;
>  
> @@ -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
> 
> 

-- 
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] 16+ messages in thread

* Re: [PATCH v1 2/2] sfp: add support for 100 base-x SFPs
  2021-01-11 13:06 ` [PATCH v1 2/2] sfp: add support for 100 base-x SFPs Bjarni Jonasson
@ 2021-01-11 14:22   ` Russell King - ARM Linux admin
  2021-01-12 15:31     ` Bjarni Jonasson
  0 siblings, 1 reply; 16+ messages in thread
From: Russell King - ARM Linux admin @ 2021-01-11 14:22 UTC (permalink / raw)
  To: Bjarni Jonasson
  Cc: Andrew Lunn, Heiner Kallweit, David S. Miller, Jakub Kicinski,
	netdev, linux-kernel, UNGLinuxDriver

On Mon, Jan 11, 2021 at 02:06:57PM +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>
> ---
>  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 58014feedf6c..b2a9ee3dd28e 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);

Do you have any modules that identify as PX or BX10 modules? What if
their range of speeds covers 100M - you're only checking the nominal
speed here.

Note that this will likely conflict with changes I submitted over the
weekend, and it really needs to be done _before_ the comment about
"If we haven't discovered any modes", not below.

-- 
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] 16+ messages in thread

* Re: [PATCH v1 1/2] net: phy: Add 100 base-x mode
  2021-01-11 13:06 ` [PATCH v1 1/2] net: phy: " Bjarni Jonasson
  2021-01-11 14:19   ` Russell King - ARM Linux admin
@ 2021-01-11 14:26   ` Andrew Lunn
  2021-01-11 16:47   ` Russell King - ARM Linux admin
  2021-01-11 19:37   ` Michał Mirosław
  3 siblings, 0 replies; 16+ messages in thread
From: Andrew Lunn @ 2021-01-11 14:26 UTC (permalink / raw)
  To: Bjarni Jonasson
  Cc: Russell King, Heiner Kallweit, David S. Miller, Jakub Kicinski,
	netdev, linux-kernel, UNGLinuxDriver

On Mon, Jan 11, 2021 at 02:06:56PM +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: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v1 1/2] net: phy: Add 100 base-x mode
  2021-01-11 13:06 ` [PATCH v1 1/2] net: phy: " Bjarni Jonasson
  2021-01-11 14:19   ` Russell King - ARM Linux admin
  2021-01-11 14:26   ` Andrew Lunn
@ 2021-01-11 16:47   ` Russell King - ARM Linux admin
  2021-01-12 15:32     ` Bjarni Jonasson
  2021-01-11 19:37   ` Michał Mirosław
  3 siblings, 1 reply; 16+ messages in thread
From: Russell King - ARM Linux admin @ 2021-01-11 16:47 UTC (permalink / raw)
  To: Bjarni Jonasson
  Cc: Andrew Lunn, Heiner Kallweit, David S. Miller, Jakub Kicinski,
	netdev, linux-kernel, UNGLinuxDriver

On Mon, Jan 11, 2021 at 02:06:56PM +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>

Oh, I forgot - please can we have the new PHY mode documented in
Documentation/networking/phy.rst under the "PHY interface modes"
section. 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] 16+ messages in thread

* Re: [PATCH v1 1/2] net: phy: Add 100 base-x mode
  2021-01-11 13:06 ` [PATCH v1 1/2] net: phy: " Bjarni Jonasson
                     ` (2 preceding siblings ...)
  2021-01-11 16:47   ` Russell King - ARM Linux admin
@ 2021-01-11 19:37   ` Michał Mirosław
  2021-01-12 15:34     ` Bjarni Jonasson
  3 siblings, 1 reply; 16+ messages in thread
From: Michał Mirosław @ 2021-01-11 19:37 UTC (permalink / raw)
  To: Bjarni Jonasson
  Cc: Russell King, Andrew Lunn, Heiner Kallweit, David S. Miller,
	Jakub Kicinski, netdev, Linux Kernel, UNGLinuxDriver

pon., 11 sty 2021 o 14:54 Bjarni Jonasson
<bjarni.jonasson@microchip.com> napisał(a):
> Sparx-5 supports this mode and it is missing in the PHY core.
>
> Signed-off-by: Bjarni Jonasson <bjarni.jonasson@microchip.com>
> ---
>  include/linux/phy.h | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/include/linux/phy.h b/include/linux/phy.h
> index 56563e5e0dc7..dce867222d58 100644
> --- a/include/linux/phy.h
> +++ b/include/linux/phy.h
> @@ -111,6 +111,7 @@ extern const int phy_10gbit_features_array[1];
>   * @PHY_INTERFACE_MODE_10GBASER: 10G BaseR
>   * @PHY_INTERFACE_MODE_USXGMII:  Universal Serial 10GE MII
>   * @PHY_INTERFACE_MODE_10GKR: 10GBASE-KR - with Clause 73 AN
> + * @PHY_INTERFACE_MODE_100BASEX: 100 BaseX
>   * @PHY_INTERFACE_MODE_MAX: Book keeping
[...]

This is kernel-internal interface, so maybe the new mode can be
inserted before 1000baseX for easier lookup?

Best Regards
Michał Mirosław

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v1 0/2] Add 100 base-x mode
  2021-01-11 14:18 ` [PATCH v1 0/2] Add 100 base-x mode Russell King - ARM Linux admin
@ 2021-01-12 14:33   ` Bjarni Jonasson
  2021-01-12 16:05     ` Russell King - ARM Linux admin
  0 siblings, 1 reply; 16+ messages in thread
From: Bjarni Jonasson @ 2021-01-12 14:33 UTC (permalink / raw)
  To: Russell King - ARM Linux admin
  Cc: Andrew Lunn, Heiner Kallweit, David S. Miller, Jakub Kicinski,
	netdev, linux-kernel, UNGLinuxDriver

[-- Attachment #1: Type: text/plain, Size: 1124 bytes --]

On Mon, 2021-01-11 at 14:18 +0000, Russell King - ARM Linux admin
wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
> 
> On Mon, Jan 11, 2021 at 02:06:55PM +0100, Bjarni Jonasson 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
> > Cisco GLC-FE-100LX
> > HP SFP 100FX J9054C
> > Excom SFP-SX-M1002
> 
> For each of these modules, please send me:
> 
> ethtool -m ethx raw on > module.bin
> 
> so I can validate future changes with these modules. Thanks.
> 
> --
> RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
> FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

I've included the dump from ethtool for:
Axcen 100fx AXFE-1314-0521
Axcen 100lx AXFE-1314-0551
Excom SFP-SX-M1002
HP SFP 100FX J9054C
The "ethtool raw" output seems a bit garbled so I added the hex output
as well.

Rgds
--
Bjarni Jonasson
Microchip 


[-- Attachment #2: axcen_100fx_axfe_1314_0521.bin --]
[-- Type: application/octet-stream, Size: 1486 bytes --]

# ethtool -m eth13 raw on
 ÈÈAxcen Photonics -AXFE-1314-0521  V1.0CAX10190001946   100512  «EXTREMELY COMPATIBLE            A09090300419    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ#

# ethtool -m eth13 hex on
Offset          Values
------          ------
0x0000:         03 04 07 00 00 01 20 00 00 00 00 02 01 00 00 00
0x0010:         c8 c8 00 00 41 78 63 65 6e 20 50 68 6f 74 6f 6e
0x0020:         69 63 73 20 00 00 17 2d 41 58 46 45 2d 31 33 31
0x0030:         34 2d 30 35 32 31 20 20 56 31 2e 30 05 1e 00 43
0x0040:         00 1a 00 00 41 58 31 30 31 39 30 30 30 31 39 34
0x0050:         36 20 20 20 31 30 30 35 31 32 20 20 00 00 00 ab
0x0060:         45 58 54 52 45 4d 45 4c 59 20 43 4f 4d 50 41 54
0x0070:         49 42 4c 45 20 20 20 20 20 20 20 20 20 20 20 20
0x0080:         41 30 39 30 39 30 33 30 30 34 31 39 20 20 20 20
0x0090:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00a0:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00b0:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00c0:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00d0:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00e0:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00f0:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

[-- Attachment #3: axcen_100lx_axfe_1314_0551.bin --]
[-- Type: application/octet-stream, Size: 1484 bytes --]

# ethtool -m eth13 raw on
ÿAxcen Photonics -AXFE-1314-0551  V1.0ÔAX14091702260   090420  ²EXTREMELY COMPATIBLE            A090300031001557ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ#

# ethtool -m eth13 hex on
Offset          Values
------          ------
0x0000:         03 04 07 00 10 02 10 00 00 00 00 02 01 00 1e ff
0x0010:         00 00 00 00 41 78 63 65 6e 20 50 68 6f 74 6f 6e
0x0020:         69 63 73 20 00 00 17 2d 41 58 46 45 2d 31 33 31
0x0030:         34 2d 30 35 35 31 20 20 56 31 2e 30 05 1e 00 d4
0x0040:         00 1a 00 00 41 58 31 34 30 39 31 37 30 32 32 36
0x0050:         30 20 20 20 30 39 30 34 32 30 20 20 00 00 00 b2
0x0060:         45 58 54 52 45 4d 45 4c 59 20 43 4f 4d 50 41 54
0x0070:         49 42 4c 45 20 20 20 20 20 20 20 20 20 20 20 20
0x0080:         41 30 39 30 33 30 30 30 33 31 30 30 31 35 35 37
0x0090:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00a0:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00b0:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00c0:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00d0:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00e0:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00f0:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

[-- Attachment #4: excom_sfp_sx_m1002.bin --]
[-- Type: application/octet-stream, Size: 2751 bytes --]

# ethtool -m eth13 raw on
´ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿZÓUØpim`ÃP¯È2
                                                                                                                                              Zû Ð<¦ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ?ÿÿÿs*ÿÿÿÿ@ÿ@ÿÿÿCNUIADYAAA10-2077-01V01 F¿ªªGLC-FE-100FX        167(..14)6fÿÀÿÿÿÀÿÿ#

# ethtool -m eth13 hex on
Offset          Values
------          ------
0x0000:         03 04 07 00 00 01 10 00 00 00 00 02 01 00 00 00
0x0010:         c8 c8 00 00 45 78 63 6f 6d 20 20 20 20 20 20 20
0x0020:         20 20 20 20 00 00 00 00 53 46 50 2d 53 58 2d 4d
0x0030:         31 30 30 32 20 20 20 20 41 20 20 20 05 1e 00 50
0x0040:         00 12 00 00 45 58 31 36 30 33 31 34 30 33 36 20
0x0050:         20 20 20 20 31 36 30 33 31 34 20 20 68 90 01 7f
0x0060:         2b 00 11 38 97 ce 09 19 1e 69 ca eb e5 17 6a 5e
0x0070:         89 ac ce 00 00 00 00 00 00 00 00 00 1a 7d 8d b4
0x0080:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x0090:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00a0:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00b0:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00c0:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00d0:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00e0:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00f0:         ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x0100:         5a 00 d3 00 55 00 d8 00 94 70 69 78 90 88 6d 60
0x0110:         c3 50 00 00 af c8 00 32 0c 5a 00 fb 09 d0 01 3c
0x0120:         18 a6 00 03 13 94 00 04 ff ff ff ff ff ff ff ff
0x0130:         ff ff ff ff ff ff ff ff 00 00 00 00 00 00 00 00
0x0140:         00 00 00 00 3f 80 00 00 00 00 00 00 01 00 00 00
0x0150:         01 00 00 00 01 00 00 00 01 00 00 00 ff ff ff 73
0x0160:         1b 06 83 c1 2b d4 03 e2 00 00 ff ff ff ff 02 00
0x0170:         00 40 00 ff 00 40 ff ff 00 00 ff 00 00 00 00 00
0x0180:         43 4e 55 49 41 44 59 41 41 41 31 30 2d 32 30 37
0x0190:         37 2d 30 31 56 30 31 20 01 00 46 00 00 00 00 bf
0x01a0:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x01b0:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 aa aa
0x01c0:         47 4c 43 2d 46 45 2d 31 30 30 46 58 20 20 20 20
0x01d0:         20 20 20 20 31 36 00 00 00 00 00 00 00 00 00 37
0x01e0:         1e 28 2e 2e 31 34 29 36 00 00 00 00 00 00 00 00
0x01f0:         00 00 00 00 00 66 00 00 ff c0 ff ff ff c0 ff ff

[-- Attachment #5: hp_100fx_j9054c.bin --]
[-- Type: application/octet-stream, Size: 2471 bytes --]

# ethtool -m eth13 raw on
@ÈÈOPNEXT INC
                   @TRF5326ANLB404  A2A ICN19DY900H      110930  hðJ9054C 1990-4112FýÖEñâ>HP ProCurve Proprietary Technology - Use implies acceptance of licensing terms.HP100-FX    UöPû
                                         u¸yu0ôa¨èÿÿ
ÿÿ
võ?mÐ@@

# ethtool -m eth13 hex on
Offset          Values
------          ------
0x0000:         03 04 07 00 00 00 40 00 00 00 00 02 01 00 00 00
0x0010:         c8 c8 00 00 4f 50 4e 45 58 54 20 49 4e 43 20 20
0x0020:         20 20 20 20 00 00 0b 40 54 52 46 35 33 32 36 41
0x0030:         4e 4c 42 34 30 34 20 20 41 32 41 20 00 00 00 49
0x0040:         00 1a 00 00 43 4e 31 39 44 59 39 30 30 48 20 20
0x0050:         20 20 20 20 31 31 30 39 33 30 20 20 68 f0 01 1a
0x0060:         00 00 00 00 00 00 00 00 4a 39 30 35 34 43 20 31
0x0070:         39 39 30 2d 34 31 31 32 46 fd d6 80 45 f1 86 e2
0x0080:         3e 48 50 20 50 72 6f 43 75 72 76 65 20 50 72 6f
0x0090:         70 72 69 65 74 61 72 79 20 54 65 63 68 6e 6f 6c
0x00a0:         6f 67 79 20 2d 20 55 73 65 20 69 6d 70 6c 69 65
0x00b0:         73 20 61 63 63 65 70 74 61 6e 63 65 20 6f 66 20
0x00c0:         6c 69 63 65 6e 73 69 6e 67 20 74 65 72 6d 73 2e
0x00d0:         48 50 31 30 30 2d 46 58 20 20 20 20 00 00 00 00
0x00e0:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00f0:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0100:         55 00 f6 00 50 00 fb 00 8c a0 75 30 88 b8 79 18
0x0110:         75 30 01 f4 61 a8 03 e8 ff ff 00 0a ff ff 00 0a
0x0120:         02 76 00 05 01 f5 00 06 00 00 00 00 00 00 00 00
0x0130:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0140:         00 00 00 00 3f 80 00 00 00 00 00 00 01 00 00 00
0x0150:         01 00 00 00 01 00 00 00 01 00 00 00 00 00 00 12
0x0160:         1e 00 82 00 1f 35 00 d8 00 00 00 00 00 00 12 00
0x0170:         00 40 00 00 00 40 00 00 00 00 00 00 00 00 00 00
0x0180:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0190:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x01a0:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x01b0:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x01c0:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x01d0:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x01e0:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x01f0:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v1 2/2] sfp: add support for 100 base-x SFPs
  2021-01-11 14:22   ` Russell King - ARM Linux admin
@ 2021-01-12 15:31     ` Bjarni Jonasson
  2021-01-12 15:39       ` Andrew Lunn
  0 siblings, 1 reply; 16+ messages in thread
From: Bjarni Jonasson @ 2021-01-12 15:31 UTC (permalink / raw)
  To: Russell King - ARM Linux admin
  Cc: Andrew Lunn, Heiner Kallweit, David S. Miller, Jakub Kicinski,
	netdev, linux-kernel, UNGLinuxDriver

On Mon, 2021-01-11 at 14:22 +0000, Russell King - ARM Linux admin
wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
> 
> On Mon, Jan 11, 2021 at 02:06:57PM +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>
> > ---
> >  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 58014feedf6c..b2a9ee3dd28e 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);
> 
> Do you have any modules that identify as PX or BX10 modules? What if
> their range of speeds covers 100M - you're only checking the nominal
> speed here.

I have one module that is identified as BX10 (HP-SFP-100FX-J9054C), but
it seems that the PX should also be there according to the standard.

All 100fx modules I've tested had br_min == br_max == br_nom == 100 so
I really don't know what else to use.

> Note that this will likely conflict with changes I submitted over the
> weekend, and it really needs to be done _before_ the comment about
> "If we haven't discovered any modes", not below.

Not sure what you mean, the patch is above the comment (line 265 vs
345).  The patch is on top of 5.10, is that the issue?

> 
> --
> RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
> FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

Rgds
--
Bjarni Jonasson
Microchip




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v1 1/2] net: phy: Add 100 base-x mode
  2021-01-11 16:47   ` Russell King - ARM Linux admin
@ 2021-01-12 15:32     ` Bjarni Jonasson
  0 siblings, 0 replies; 16+ messages in thread
From: Bjarni Jonasson @ 2021-01-12 15:32 UTC (permalink / raw)
  To: Russell King - ARM Linux admin
  Cc: Andrew Lunn, Heiner Kallweit, David S. Miller, Jakub Kicinski,
	netdev, linux-kernel, UNGLinuxDriver

On Mon, 2021-01-11 at 16:47 +0000, Russell King - ARM Linux admin
wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
> 
> On Mon, Jan 11, 2021 at 02:06:56PM +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>
> 
> Oh, I forgot - please can we have the new PHY mode documented in
> Documentation/networking/phy.rst under the "PHY interface modes"
> section. Thanks.
> --
> RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
> FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

Will do that.
--
Bjarni Jonasson


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v1 1/2] net: phy: Add 100 base-x mode
  2021-01-11 19:37   ` Michał Mirosław
@ 2021-01-12 15:34     ` Bjarni Jonasson
  0 siblings, 0 replies; 16+ messages in thread
From: Bjarni Jonasson @ 2021-01-12 15:34 UTC (permalink / raw)
  To: Michał Mirosław
  Cc: Russell King, Andrew Lunn, Heiner Kallweit, David S. Miller,
	Jakub Kicinski, netdev, Linux Kernel, UNGLinuxDriver

On Mon, 2021-01-11 at 20:37 +0100, Michał Mirosław wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
> 
> pon., 11 sty 2021 o 14:54 Bjarni Jonasson
> <bjarni.jonasson@microchip.com> napisał(a):
> > Sparx-5 supports this mode and it is missing in the PHY core.
> > 
> > Signed-off-by: Bjarni Jonasson <bjarni.jonasson@microchip.com>
> > ---
> >  include/linux/phy.h | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/include/linux/phy.h b/include/linux/phy.h
> > index 56563e5e0dc7..dce867222d58 100644
> > --- a/include/linux/phy.h
> > +++ b/include/linux/phy.h
> > @@ -111,6 +111,7 @@ extern const int phy_10gbit_features_array[1];
> >   * @PHY_INTERFACE_MODE_10GBASER: 10G BaseR
> >   * @PHY_INTERFACE_MODE_USXGMII:  Universal Serial 10GE MII
> >   * @PHY_INTERFACE_MODE_10GKR: 10GBASE-KR - with Clause 73 AN
> > + * @PHY_INTERFACE_MODE_100BASEX: 100 BaseX
> >   * @PHY_INTERFACE_MODE_MAX: Book keeping
> 
> [...]
> 
> This is kernel-internal interface, so maybe the new mode can be
> inserted before 1000baseX for easier lookup?
> 
> Best Regards
> Michał Mirosław

Yes, will do that.
--
Bjarni Jonasson
Microchip



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v1 2/2] sfp: add support for 100 base-x SFPs
  2021-01-12 15:31     ` Bjarni Jonasson
@ 2021-01-12 15:39       ` Andrew Lunn
  0 siblings, 0 replies; 16+ messages in thread
From: Andrew Lunn @ 2021-01-12 15:39 UTC (permalink / raw)
  To: Bjarni Jonasson
  Cc: Russell King - ARM Linux admin, Heiner Kallweit, David S. Miller,
	Jakub Kicinski, netdev, linux-kernel, UNGLinuxDriver

> Not sure what you mean, the patch is above the comment (line 265 vs
> 345).  The patch is on top of 5.10, is that the issue?

All networking patches for the next merge window should be against
net-next. Please see:

https://www.kernel.org/doc/html/latest/networking/netdev-FAQ.html

which talks about the different trees.

      Andrew

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v1 0/2] Add 100 base-x mode
  2021-01-12 14:33   ` Bjarni Jonasson
@ 2021-01-12 16:05     ` Russell King - ARM Linux admin
  2021-01-13  9:45       ` Bjarni Jonasson
  0 siblings, 1 reply; 16+ messages in thread
From: Russell King - ARM Linux admin @ 2021-01-12 16:05 UTC (permalink / raw)
  To: Bjarni Jonasson
  Cc: Andrew Lunn, Heiner Kallweit, David S. Miller, Jakub Kicinski,
	netdev, linux-kernel, UNGLinuxDriver

On Tue, Jan 12, 2021 at 03:33:34PM +0100, Bjarni Jonasson wrote:
> On Mon, 2021-01-11 at 14:18 +0000, Russell King - ARM Linux admin
> wrote:
> > EXTERNAL EMAIL: Do not click links or open attachments unless you
> > know the content is safe
> > 
> > On Mon, Jan 11, 2021 at 02:06:55PM +0100, Bjarni Jonasson 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
> > > Cisco GLC-FE-100LX
> > > HP SFP 100FX J9054C
> > > Excom SFP-SX-M1002
> > 
> > For each of these modules, please send me:
> > 
> > ethtool -m ethx raw on > module.bin
> > 
> > so I can validate future changes with these modules. Thanks.
> > 
> > --
> > RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
> > FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
> 
> I've included the dump from ethtool for:
> Axcen 100fx AXFE-1314-0521
> Axcen 100lx AXFE-1314-0551
> Excom SFP-SX-M1002
> HP SFP 100FX J9054C
> The "ethtool raw" output seems a bit garbled so I added the hex output
> as well.

It is exactly the command that I quoted above that I require. Yes,
the output will be "garbled" as it is a raw binary dump of the EEPROM
contents - it's not meant to be displayed directly on the console.

Please resend.

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] 16+ messages in thread

* Re: [PATCH v1 0/2] Add 100 base-x mode
  2021-01-12 16:05     ` Russell King - ARM Linux admin
@ 2021-01-13  9:45       ` Bjarni Jonasson
  0 siblings, 0 replies; 16+ messages in thread
From: Bjarni Jonasson @ 2021-01-13  9:45 UTC (permalink / raw)
  To: Russell King - ARM Linux admin
  Cc: Andrew Lunn, Heiner Kallweit, David S. Miller, Jakub Kicinski,
	netdev, linux-kernel, UNGLinuxDriver

[-- Attachment #1: Type: text/plain, Size: 1950 bytes --]

On Tue, 2021-01-12 at 16:05 +0000, Russell King - ARM Linux admin
wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
> 
> On Tue, Jan 12, 2021 at 03:33:34PM +0100, Bjarni Jonasson wrote:
> > On Mon, 2021-01-11 at 14:18 +0000, Russell King - ARM Linux admin
> > wrote:
> > > EXTERNAL EMAIL: Do not click links or open attachments unless you
> > > know the content is safe
> > > 
> > > On Mon, Jan 11, 2021 at 02:06:55PM +0100, Bjarni Jonasson 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
> > > > Cisco GLC-FE-100LX
> > > > HP SFP 100FX J9054C
> > > > Excom SFP-SX-M1002
> > > 
> > > For each of these modules, please send me:
> > > 
> > > ethtool -m ethx raw on > module.bin
> > > 
> > > so I can validate future changes with these modules. Thanks.
> > > 
> > > --
> > > RMK's Patch system: 
> > > https://www.armlinux.org.uk/developer/patches/
> > > FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
> > 
> > I've included the dump from ethtool for:
> > Axcen 100fx AXFE-1314-0521
> > Axcen 100lx AXFE-1314-0551
> > Excom SFP-SX-M1002
> > HP SFP 100FX J9054C
> > The "ethtool raw" output seems a bit garbled so I added the hex
> > output
> > as well.
> 
> It is exactly the command that I quoted above that I require. Yes,
> the output will be "garbled" as it is a raw binary dump of the EEPROM
> contents - it's not meant to be displayed directly on the console.
> 
> Please resend.
> 
> Thanks.
> 
> --
> RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
> FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

Resending the raw format for the 4 modules.
Rgds
--
Bjarni Jonasson
Microchip

[-- Attachment #2: axcen_100fx_axfe_1314_0521.bin --]
[-- Type: application/octet-stream, Size: 256 bytes --]

[-- Attachment #3: axcen_100lx_axfe_1314_0551.bin --]
[-- Type: application/octet-stream, Size: 256 bytes --]

[-- Attachment #4: excom_sfp_sx_m1002.bin --]
[-- Type: application/octet-stream, Size: 512 bytes --]

[-- Attachment #5: hp_100fx_j9054c.bin --]
[-- Type: application/octet-stream, Size: 512 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-01-13  9:47 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-11 13:06 [PATCH v1 0/2] Add 100 base-x mode Bjarni Jonasson
2021-01-11 13:06 ` [PATCH v1 1/2] net: phy: " Bjarni Jonasson
2021-01-11 14:19   ` Russell King - ARM Linux admin
2021-01-11 14:26   ` Andrew Lunn
2021-01-11 16:47   ` Russell King - ARM Linux admin
2021-01-12 15:32     ` Bjarni Jonasson
2021-01-11 19:37   ` Michał Mirosław
2021-01-12 15:34     ` Bjarni Jonasson
2021-01-11 13:06 ` [PATCH v1 2/2] sfp: add support for 100 base-x SFPs Bjarni Jonasson
2021-01-11 14:22   ` Russell King - ARM Linux admin
2021-01-12 15:31     ` Bjarni Jonasson
2021-01-12 15:39       ` Andrew Lunn
2021-01-11 14:18 ` [PATCH v1 0/2] Add 100 base-x mode Russell King - ARM Linux admin
2021-01-12 14:33   ` Bjarni Jonasson
2021-01-12 16:05     ` Russell King - ARM Linux admin
2021-01-13  9:45       ` Bjarni Jonasson

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.