diff mbox series

[net] net: phylink: allow RGMII/RTBI in-band status

Message ID 20220819092607.2628716-1-dqfext@gmail.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series [net] net: phylink: allow RGMII/RTBI in-band status | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 85 this patch: 85
netdev/cc_maintainers success CCed 8 of 8 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 85 this patch: 85
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 11 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Qingfang Deng Aug. 19, 2022, 9:26 a.m. UTC
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(+)

Comments

Jakub Kicinski Aug. 23, 2022, 10:26 p.m. UTC | #1
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);
Russell King (Oracle) Aug. 23, 2022, 10:49 p.m. UTC | #2
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.
Qingfang Deng Aug. 24, 2022, 3:16 a.m. UTC | #3
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.
diff mbox series

Patch

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