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>] [day] [month] [year] [list]
Message-ID: <3daee015-1192-5dc8-14cb-8e6988ddd2ee@smile.fr>
Date: Mon, 3 Jul 2023 11:29:36 +0200
From: Romain Naour <romain.naour@...le.fr>
To: Lukas Rusak <lrusak@...trac.ca>
Cc: "arun.ramadoss@...rochip.com" <arun.ramadoss@...rochip.com>,
 Romain Naour <romain.naour@....com>, rakesh.sankaranarayanan@...rochip.com,
 o.rempel@...gutronix.de, netdev@...r.kernel.org
Subject: Re: TR: Linux Kernel KSZ9477 Driver Questions

Hello Lukas,

Adding the Linux netdev mailing list in Cc.

Le 03/07/2023 à 11:10, Romain Naour a écrit :
> 
> --------------------------------------------------------------------------------
> *De :* Oleksij Rempel <o.rempel@...gutronix.de>
> *Envoyé :* samedi 1 juillet 2023 17:02
> *À :* Lukas Rusak <lrusak@...trac.ca>
> *Cc :* arun.ramadoss@...rochip.com <arun.ramadoss@...rochip.com>;
> rakesh.sankaranarayanan@...rochip.com <rakesh.sankaranarayanan@...rochip.com>;
> Romain Naour <romain.naour@....com>
> *Objet :* Re: Linux Kernel KSZ9477 Driver Questions
>  
> [Vous ne recevez pas souvent de courriers de o.rempel@...gutronix.de. Découvrez
> pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification
> <https://aka.ms/LearnAboutSenderIdentification> ]
> 
> Caution: External Email
> 
> Hello Lukas,
> 
> On Wed, Jun 28, 2023 at 03:39:32PM +0000, Lukas Rusak wrote:
>> Hello All,
>>
>> I have some questions about the mainline KSZ9477 DSA driver. I'm saw
>> that you all are actively developing the driver via the drivers commit
>> history.
>>
>> Chipset: KSZ9896 Kernel version: 6.1.34
>>
>> I'm wondering how fully featured this driver is currently. I'm trying
>> to switch from the out of tree driver
>> (https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrochip-Ethernet%2FEVB-KSZ9477&data=05%7C01%7Cromain.naour%40skf.com%7Cecf917241db84b04712a08db7a44313e%7C41875f2b33e8467092a8f643afbb243a%7C0%7C0%7C638238205539119182%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=qkCsvUhZldpTtDwOlJ0Sq1bV3qEahbuJ%2B7SFLSVXRm8%3D&reserved=0 <https://github.com/Microchip-Ethernet/EVB-KSZ9477>)
>>
>> I'm running into an issue where our switch ports are only running at
>> 100mbps and I'm not sure if it's a configuration problem or something
>> missing in the driver.
>>
>> ethtool reports that 1000baseT/Full isn't advertised from the link
>> partner (but it works with the out of tree driver).
>>
>> Thoughts?
> 
> Hard to say something without debugging.
> 
> I worked with KSZ9563 back for some months with kernel 6.3.
> 1000BaseT/Full was working as expected. You seems to use different chip
> variant - KSZ9896, which I do no have. I hope some one with this variant
> can response here.

I checked on my board using the KSZ9896 and all ports are running at 1000Mb/s.
But I'm still using an vendor kernel 5.10.x where the driver has been backported.

# ethtool lan1
Settings for lan1:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                             100baseT/Half 100baseT/Full
                                             1000baseT/Half 1000baseT/Full
        Link partner advertised pause frame use: Symmetric Receive-only
        Link partner advertised auto-negotiation: Yes
        Link partner advertised FEC modes: Not reported
        Speed: 1000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        MDI-X: Unknown
        Supports Wake-on: d
        Wake-on: d
        Link detected: yes

[    5.423736] ksz9477-switch spi1.0: Found KSZ9477 or compatible
[    5.423736] ksz9477-switch spi1.0: Found KSZ9896
[    5.425628] ksz9477-switch spi1.0: Port5: using phy mode rgmii-txid
[    5.433868] ksz9477-switch spi1.0 lan1 (uninitialized): PHY [dsa-0.0:00]
driver [Microchip KSZ9477] (irq=POLL)
[    5.434783] ksz9477-switch spi1.0 lan2 (uninitialized): PHY [dsa-0.0:01]
driver [Microchip KSZ9477] (irq=POLL)
[    5.435638] ksz9477-switch spi1.0 lan3 (uninitialized): PHY [dsa-0.0:02]
driver [Microchip KSZ9477] (irq=POLL)
[    5.436492] ksz9477-switch spi1.0 lan4 (uninitialized): PHY [dsa-0.0:03]
driver [Microchip KSZ9477] (irq=POLL)
[    5.437530] ksz9477-switch spi1.0: configuring for fixed/rgmii-txid link mode
[    5.441680] ksz9477-switch spi1.0: Link is Up - 1Gbps/Full - flow control off
[  209.212463] ksz9477-switch spi1.0 lan1: configuring for phy/gmii link mode
[  212.343933] ksz9477-switch spi1.0 lan1: Link is Up - 1Gbps/Full - flow
control rx/tx

> 
>> Device tree snippet:
>> ksz9896c: ksz9896@5f {
>>         compatible = "microchip,ksz9896";
>>         reg = <0x5f>;
>>         pinctrl-names = "default";
>>         pinctrl-0 = <&phy_pins>;
>>
>>         interrupt-parent = <&gpio0>;
>>         interrupts = <31 IRQ_TYPE_LEVEL_LOW>;
>>
>>         reset-gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
>>         status = "okay";
>>
>>         ports {
>>                 #address-cells = <1>;
>>                 #size-cells = <0>;
>>                 port@0 {
>>                         reg = <0>;
>>                         label = "bcx";
>>                 };
>>                 port@1 {
>>                         reg = <1>;
>>                         label = "maintenance";
>>                 };
>>                 port@2 {
>>                         reg = <2>;
>>                         label = "cabin0";
>>                 };
>>                 port@3 {
>>                         reg = <3>;
>>                         label = "cabin1";
>>                 };
>>                 port@5 {
>>                         reg = <5>;
>>                         label = "cpu";

This label is not needed, it was removed from the ksz binding exemple.

>>                         phy-mode = "rgmii-id";
>>                         rx-internal-delay-ps = <2000>;
>>                         tx-internal-delay-ps = <2000>;
>>                         ethernet = <&mac>;
>>                         fixed-link {
>>                                 speed = <1000>;
>>                                 full-duplex;
>>                         };
>>                 };
>>         };
>> };
> 
> 
> DT looks ok.

Agree.

Best Regards,
Romain

> 
> Regards,
> Oleksij
> --
> Pengutronix e.K.                           |                             |
> Steuerwalder Str. 21                       |
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.pengutronix.de%2F&data=05%7C01%7Cromain.naour%40skf.com%7Cecf917241db84b04712a08db7a44313e%7C41875f2b33e8467092a8f643afbb243a%7C0%7C0%7C638238205539119182%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=5Clj59OK1rFfV9vJYaY6b2PJNUg0Rr4yBcvb%2Bb8%2FuGw%3D&reserved=0 <http://www.pengutronix.de/>  |
> 31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
> 
> The information contained in this email is intended solely for the use of the
> individual or entity to whom it is addressed and may contain information that is
> confidential. Please delete and notify the sender if received in error. SKF does
> not accept liability for any damage arising from this email.
> 
> For information on SKF’s processing of your personal data, please visit SKF’s
> Privacy Policy available via www.skf.com
> <https://www.skf.com/us/footer/privacy-policy>.
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ