netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] net: phylink: allow RGMII/RTBI in-band status
@ 2022-08-19  9:26 Qingfang DENG
  2022-08-23 22:26 ` Jakub Kicinski
  0 siblings, 1 reply; 4+ messages in thread
From: Qingfang DENG @ 2022-08-19  9:26 UTC (permalink / raw)
  To: Russell King, Andrew Lunn, Heiner Kallweit, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev, linux-kernel

As per RGMII specification v2.0, section 3.4.1, RGMII/RTBI has an
optional in-band status feature where the PHY's link status, speed and
duplex mode can be passed to the MAC.
Allow RGMII/RTBI to use in-band status.

Fixes: 9525ae83959b ("phylink: add phylink infrastructure")
Signed-off-by: Qingfang DENG <dqfext@gmail.com>
---
 drivers/net/phy/phylink.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index 9bd69328dc4d..57186d322835 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -632,6 +632,11 @@ static int phylink_parse_mode(struct phylink *pl, struct fwnode_handle *fwnode)
 		switch (pl->link_config.interface) {
 		case PHY_INTERFACE_MODE_SGMII:
 		case PHY_INTERFACE_MODE_QSGMII:
+		case PHY_INTERFACE_MODE_RGMII:
+		case PHY_INTERFACE_MODE_RGMII_ID:
+		case PHY_INTERFACE_MODE_RGMII_RXID:
+		case PHY_INTERFACE_MODE_RGMII_TXID:
+		case PHY_INTERFACE_MODE_RTBI:
 			phylink_set(pl->supported, 10baseT_Half);
 			phylink_set(pl->supported, 10baseT_Full);
 			phylink_set(pl->supported, 100baseT_Half);
-- 
2.34.1


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

* Re: [PATCH net] net: phylink: allow RGMII/RTBI in-band status
  2022-08-19  9:26 [PATCH net] net: phylink: allow RGMII/RTBI in-band status Qingfang DENG
@ 2022-08-23 22:26 ` Jakub Kicinski
  2022-08-23 22:49   ` Russell King (Oracle)
  2022-08-24  3:16   ` DENG Qingfang
  0 siblings, 2 replies; 4+ messages in thread
From: Jakub Kicinski @ 2022-08-23 22:26 UTC (permalink / raw)
  To: Qingfang DENG
  Cc: Russell King, Andrew Lunn, Heiner Kallweit, David S. Miller,
	Eric Dumazet, Paolo Abeni, netdev, linux-kernel

On Fri, 19 Aug 2022 17:26:06 +0800 Qingfang DENG wrote:
> As per RGMII specification v2.0, section 3.4.1, RGMII/RTBI has an
> optional in-band status feature where the PHY's link status, speed and
> duplex mode can be passed to the MAC.
> Allow RGMII/RTBI to use in-band status.
> 
> Fixes: 9525ae83959b ("phylink: add phylink infrastructure")
> Signed-off-by: Qingfang DENG <dqfext@gmail.com>

Russell, PHY folks, any judgment on this one?

Qingfang is there a platform which require RGMII to be supported 
in upstream LTS branches? If there isn't you should re-target 
the patch at net-next and drop the Fixes tag. Not implementing
the entire spec is not considered a bug. Please clarify this
in the commit message.

> diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
> index 9bd69328dc4d..57186d322835 100644
> --- a/drivers/net/phy/phylink.c
> +++ b/drivers/net/phy/phylink.c
> @@ -632,6 +632,11 @@ static int phylink_parse_mode(struct phylink *pl, struct fwnode_handle *fwnode)
>  		switch (pl->link_config.interface) {
>  		case PHY_INTERFACE_MODE_SGMII:
>  		case PHY_INTERFACE_MODE_QSGMII:
> +		case PHY_INTERFACE_MODE_RGMII:
> +		case PHY_INTERFACE_MODE_RGMII_ID:
> +		case PHY_INTERFACE_MODE_RGMII_RXID:
> +		case PHY_INTERFACE_MODE_RGMII_TXID:
> +		case PHY_INTERFACE_MODE_RTBI:
>  			phylink_set(pl->supported, 10baseT_Half);
>  			phylink_set(pl->supported, 10baseT_Full);
>  			phylink_set(pl->supported, 100baseT_Half);


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

* Re: [PATCH net] net: phylink: allow RGMII/RTBI in-band status
  2022-08-23 22:26 ` Jakub Kicinski
@ 2022-08-23 22:49   ` Russell King (Oracle)
  2022-08-24  3:16   ` DENG Qingfang
  1 sibling, 0 replies; 4+ messages in thread
From: Russell King (Oracle) @ 2022-08-23 22:49 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: Qingfang DENG, Andrew Lunn, Heiner Kallweit, David S. Miller,
	Eric Dumazet, Paolo Abeni, netdev, linux-kernel

On Tue, Aug 23, 2022 at 03:26:25PM -0700, Jakub Kicinski wrote:
> On Fri, 19 Aug 2022 17:26:06 +0800 Qingfang DENG wrote:
> > As per RGMII specification v2.0, section 3.4.1, RGMII/RTBI has an
> > optional in-band status feature where the PHY's link status, speed and
> > duplex mode can be passed to the MAC.
> > Allow RGMII/RTBI to use in-band status.
> > 
> > Fixes: 9525ae83959b ("phylink: add phylink infrastructure")
> > Signed-off-by: Qingfang DENG <dqfext@gmail.com>
> 
> Russell, PHY folks, any judgment on this one?

It looks fine to me, thanks for the reminder.

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

> Qingfang is there a platform which require RGMII to be supported 
> in upstream LTS branches? If there isn't you should re-target 
> the patch at net-next and drop the Fixes tag. Not implementing
> the entire spec is not considered a bug. Please clarify this
> in the commit message.

I agree - clarification is required.

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

* Re: [PATCH net] net: phylink: allow RGMII/RTBI in-band status
  2022-08-23 22:26 ` Jakub Kicinski
  2022-08-23 22:49   ` Russell King (Oracle)
@ 2022-08-24  3:16   ` DENG Qingfang
  1 sibling, 0 replies; 4+ messages in thread
From: DENG Qingfang @ 2022-08-24  3:16 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: Russell King, Andrew Lunn, Heiner Kallweit, David S. Miller,
	Eric Dumazet, Paolo Abeni, netdev, linux-kernel

On Wed, Aug 24, 2022 at 6:26 AM Jakub Kicinski <kuba@kernel.org> wrote:
> Qingfang is there a platform which require RGMII to be supported
> in upstream LTS branches? If there isn't you should re-target
> the patch at net-next and drop the Fixes tag. Not implementing
> the entire spec is not considered a bug. Please clarify this
> in the commit message.

I'll send a v2 to re-target net-next. Thanks.

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

end of thread, other threads:[~2022-08-24  3:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-19  9:26 [PATCH net] net: phylink: allow RGMII/RTBI in-band status Qingfang DENG
2022-08-23 22:26 ` Jakub Kicinski
2022-08-23 22:49   ` Russell King (Oracle)
2022-08-24  3:16   ` DENG Qingfang

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).