All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Vladimir Oltean <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org
Subject: Re: [PATCH RFC net-next 2/5] net: dsa: b53: populate supported_interfaces and mac_capabilities
Date: Thu, 17 Feb 2022 10:17:05 +0000	[thread overview]
Message-ID: <Yg4goY/jGmVfTrkv@shell.armlinux.org.uk> (raw)
In-Reply-To: <6c6c8a56-fb78-214b-ed85-999bb76680f7@gmail.com>

On Wed, Feb 16, 2022 at 11:51:49AM -0800, Florian Fainelli wrote:
> On 2/3/22 6:48 AM, Russell King (Oracle) wrote:
> > Populate the supported interfaces and MAC capabilities for the Broadcom
> > B53 DSA switches in preparation to using these for the generic
> > validation functionality.
> > 
> > The interface modes are derived from:
> > - b53_serdes_phylink_validate()
> > - SRAB mux configuration
> > 
> > NOTE: much of this conversion is a guess as the driver doesn't contain
> > sufficient information. I would appreciate a thorough review and
> > testing of this change before it is merged.
> > 
> > Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> 
> This patch breaks with the following:
> 
> [    2.680318] b53-srab-switch 18036000.ethernet-switch sfp
> (uninitialized): failed to validate link configuration for in-band status
> [    2.692470] error creating PHYLINK: -22
> [    2.696441] b53-srab-switch 18036000.ethernet-switch sfp
> (uninitialized): error -22 setting up PHY for tree 0, switch 0, port 5
> 
> Adding more debug shows us the following:
> 
> [    2.804854] phylink_validate: unable to find a mode for 4
> 0000000,000001ff,0060004c
> [    2.812807] phylink_validate: unable to find a mode for 4
> 0000000,000001ff,0060004c
> [    2.820733] b53-srab-switch 18036000.ethernet-switch sfp
> (uninitialized): failed to validate link configuration for in-band status
> [    2.832868] error creating PHYLINK: -22
> 
> 4 = PHY_INTERFACE_MODE_SGMII and the config->supported_interfaces bitmap
> is printed. If we add this hunk, you entire patch set works again:
> 
> @@ -178,10 +180,14 @@ void b53_serdes_phylink_get_caps(struct b53_device
> *dev, int port,
>                 __set_bit(PHY_INTERFACE_MODE_1000BASEX,
>                           config->supported_interfaces);
>                 config->mac_capabilities |= MAC_1000FD;
> +               __set_bit(PHY_INTERFACE_MODE_SGMII,
> +                         config->supported_interfaces);
>                 break;
>         default:
>                 break;
>         }

Thanks, added, and I've updated the comment as well just above the first
line of the above hunk to be consistent with the code.

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

  reply	other threads:[~2022-02-17 10:17 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-03 14:48 [PATCH RFC net-next 0/5] net: dsa: b53: convert to phylink_generic_validate() and mark as non-legacy Russell King (Oracle)
2022-02-03 14:48 ` [PATCH RFC net-next 1/5] net: dsa: b53: clean up if() condition to be more readable Russell King (Oracle)
2022-02-16 17:52   ` Florian Fainelli
2022-02-03 14:48 ` [PATCH RFC net-next 2/5] net: dsa: b53: populate supported_interfaces and mac_capabilities Russell King (Oracle)
2022-02-16 19:51   ` Florian Fainelli
2022-02-17 10:17     ` Russell King (Oracle) [this message]
2022-02-03 14:48 ` [PATCH RFC net-next 3/5] net: dsa: b53: drop use of phylink_helper_basex_speed() Russell King (Oracle)
2022-02-03 14:48 ` [PATCH RFC net-next 4/5] net: dsa: b53: switch to using phylink_generic_validate() Russell King (Oracle)
2022-02-03 14:48 ` [PATCH RFC net-next 5/5] net: dsa: b53: mark as non-legacy Russell King (Oracle)
2022-02-03 17:30 ` [PATCH RFC net-next 1/5] net: dsa: b53: clean up if() condition to be more readable Russell King (Oracle)
2022-02-03 17:33   ` Russell King (Oracle)
2022-02-03 17:30 ` [PATCH RFC net-next 2/5] net: dsa: b53: populate supported_interfaces and mac_capabilities Russell King (Oracle)
2022-02-03 17:31 ` [PATCH RFC net-next 3/5] net: dsa: b53: drop use of phylink_helper_basex_speed() Russell King (Oracle)
2022-02-03 17:31 ` [PATCH RFC net-next 4/5] net: dsa: b53: switch to using phylink_generic_validate() Russell King (Oracle)
2022-02-03 17:31 ` [PATCH RFC net-next 5/5] net: dsa: b53: mark as non-legacy Russell King (Oracle)
2022-02-03 18:27 ` [PATCH RFC net-next 0/5] net: dsa: b53: convert to phylink_generic_validate() and " Florian Fainelli
2022-02-03 18:30   ` Russell King (Oracle)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yg4goY/jGmVfTrkv@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=vivien.didelot@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.