All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] net: dsa: sja1105: add 100baseT1_Full support
@ 2020-03-03  7:44 Oleksij Rempel
  2020-03-03 10:04 ` Vladimir Oltean
  2020-03-03 22:54 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Oleksij Rempel @ 2020-03-03  7:44 UTC (permalink / raw)
  To: mkl, Vladimir Oltean, Andrew Lunn, Vivien Didelot, Florian Fainelli
  Cc: Oleksij Rempel, kernel, netdev, linux-kernel, david

Validate 100baseT1_Full to make this driver work with TJA1102 PHY.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
 drivers/net/dsa/sja1105/sja1105_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/dsa/sja1105/sja1105_main.c b/drivers/net/dsa/sja1105/sja1105_main.c
index 34544b1c30dc..7b5a80ba12bd 100644
--- a/drivers/net/dsa/sja1105/sja1105_main.c
+++ b/drivers/net/dsa/sja1105/sja1105_main.c
@@ -866,6 +866,7 @@ static void sja1105_phylink_validate(struct dsa_switch *ds, int port,
 	phylink_set(mask, MII);
 	phylink_set(mask, 10baseT_Full);
 	phylink_set(mask, 100baseT_Full);
+	phylink_set(mask, 100baseT1_Full);
 	if (mii->xmii_mode[port] == XMII_MODE_RGMII)
 		phylink_set(mask, 1000baseT_Full);
 
-- 
2.25.0


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

* Re: [PATCH v1] net: dsa: sja1105: add 100baseT1_Full support
  2020-03-03  7:44 [PATCH v1] net: dsa: sja1105: add 100baseT1_Full support Oleksij Rempel
@ 2020-03-03 10:04 ` Vladimir Oltean
  2020-03-03 13:44   ` Russell King - ARM Linux admin
  2020-03-03 22:54 ` David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Vladimir Oltean @ 2020-03-03 10:04 UTC (permalink / raw)
  To: Oleksij Rempel
  Cc: mkl, Andrew Lunn, Vivien Didelot, Florian Fainelli, kernel,
	netdev, lkml, david, Russell King - ARM Linux admin,
	David S. Miller

On Tue, 3 Mar 2020 at 09:44, Oleksij Rempel <o.rempel@pengutronix.de> wrote:
>
> Validate 100baseT1_Full to make this driver work with TJA1102 PHY.
>
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> ---

I was expecting this patch sooner or later.

Acked-by: Vladimir Oltean <olteanv@gmail.com>

I should take this opportunity and express the fact that it is strange
for MAC drivers to have to sign off all possible copper and fiber
media types in their .phylink_validate method. Sooner or later
somebody is going to want to add 1000Base-T1 too. I don't think it is
going to scale very well. Russell, with your plan to make MAC drivers
just populate a bitmap of phy_modes (MII side), is it also going to
get rid of media side validation?

>  drivers/net/dsa/sja1105/sja1105_main.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/dsa/sja1105/sja1105_main.c b/drivers/net/dsa/sja1105/sja1105_main.c
> index 34544b1c30dc..7b5a80ba12bd 100644
> --- a/drivers/net/dsa/sja1105/sja1105_main.c
> +++ b/drivers/net/dsa/sja1105/sja1105_main.c
> @@ -866,6 +866,7 @@ static void sja1105_phylink_validate(struct dsa_switch *ds, int port,
>         phylink_set(mask, MII);
>         phylink_set(mask, 10baseT_Full);
>         phylink_set(mask, 100baseT_Full);
> +       phylink_set(mask, 100baseT1_Full);
>         if (mii->xmii_mode[port] == XMII_MODE_RGMII)
>                 phylink_set(mask, 1000baseT_Full);
>
> --
> 2.25.0
>

Regards,
-Vladimir

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

* Re: [PATCH v1] net: dsa: sja1105: add 100baseT1_Full support
  2020-03-03 10:04 ` Vladimir Oltean
@ 2020-03-03 13:44   ` Russell King - ARM Linux admin
  0 siblings, 0 replies; 4+ messages in thread
From: Russell King - ARM Linux admin @ 2020-03-03 13:44 UTC (permalink / raw)
  To: Vladimir Oltean
  Cc: Oleksij Rempel, mkl, Andrew Lunn, Vivien Didelot,
	Florian Fainelli, kernel, netdev, lkml, david, David S. Miller

On Tue, Mar 03, 2020 at 12:04:04PM +0200, Vladimir Oltean wrote:
> On Tue, 3 Mar 2020 at 09:44, Oleksij Rempel <o.rempel@pengutronix.de> wrote:
> >
> > Validate 100baseT1_Full to make this driver work with TJA1102 PHY.
> >
> > Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> > ---
> 
> I was expecting this patch sooner or later.
> 
> Acked-by: Vladimir Oltean <olteanv@gmail.com>
> 
> I should take this opportunity and express the fact that it is strange
> for MAC drivers to have to sign off all possible copper and fiber
> media types in their .phylink_validate method. Sooner or later
> somebody is going to want to add 1000Base-T1 too. I don't think it is
> going to scale very well. Russell, with your plan to make MAC drivers
> just populate a bitmap of phy_modes (MII side), is it also going to
> get rid of media side validation?

You're touching on a concern I've had for some time that the link modes
mix together several different parameters: speed, duplex, and media.

What we actually want for a MAC is to know which speeds and duplexes
they support for each interface mode, and then translate that to the
ethtool link modes as appropriate.  That isn't a problem I've addressed
yet, but something that could be addressed.

I've just updated my net-queue with a bunch of stuff that's been
sitting in other branches (some published, some not), which includes
the PHY_INTERFACE_MODE bitmap changes - everything from and including
"net: mvpp2: add port support helpers" concerns the bitmap stuff.

At the moment, it has to support both the new bitmap solution and the
legacy solution, but hopefully in time we can drop the legacy solution.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

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

* Re: [PATCH v1] net: dsa: sja1105: add 100baseT1_Full support
  2020-03-03  7:44 [PATCH v1] net: dsa: sja1105: add 100baseT1_Full support Oleksij Rempel
  2020-03-03 10:04 ` Vladimir Oltean
@ 2020-03-03 22:54 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2020-03-03 22:54 UTC (permalink / raw)
  To: o.rempel
  Cc: mkl, olteanv, andrew, vivien.didelot, f.fainelli, kernel, netdev,
	linux-kernel, david

From: Oleksij Rempel <o.rempel@pengutronix.de>
Date: Tue,  3 Mar 2020 08:44:14 +0100

> Validate 100baseT1_Full to make this driver work with TJA1102 PHY.
> 
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>

Applied to net-next, thank you.

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

end of thread, other threads:[~2020-03-03 22:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-03  7:44 [PATCH v1] net: dsa: sja1105: add 100baseT1_Full support Oleksij Rempel
2020-03-03 10:04 ` Vladimir Oltean
2020-03-03 13:44   ` Russell King - ARM Linux admin
2020-03-03 22:54 ` David Miller

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.