lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6c6c8a56-fb78-214b-ed85-999bb76680f7@gmail.com>
Date:   Wed, 16 Feb 2022 11:51:49 -0800
From:   Florian Fainelli <f.fainelli@...il.com>
To:     "Russell King (Oracle)" <rmk+kernel@...linux.org.uk>
Cc:     Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Vladimir Oltean <olteanv@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org
Subject: Re: [PATCH RFC net-next 2/5] net: dsa: b53: populate
 supported_interfaces and mac_capabilities

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@...linux.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;
        }
--
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ