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: <62f5452a-7ce9-46e0-a8fd-0056920fef19@electromag.com.au>
Date: Wed, 13 Dec 2023 12:55:26 +0800
From: Richard Tresidder <rtresidd@...ctromag.com.au>
To: Serge Semin <fancer.lancer@...il.com>
Cc: Andrew Lunn <andrew@...n.ch>, Jakub Kicinski <kuba@...nel.org>,
  vinschen@...hat.com, netdev@...r.kernel.org
Subject: Re: STMMAC Ethernet Driver support

On 12/12/2023 5:27 pm, Serge Semin wrote:
> On Tue, Dec 12, 2023 at 11:57:22AM +0800, Richard Tresidder wrote:
>> <font face="monospace">Richard Tresidder</font>
>>
>>
>> On 12/12/2023 12:16 am, Andrew Lunn wrote:
>>>> We use the SOC's internal  STMMAC interface to connect to a Marvel switch IC
>>>> and expose each port individually using vlan, I'd forgot that part.
>>>> It's an  88E6352-xx-TFJ2I000  device utilising the 'marvell,mv88e6085'
>>>> compatible driver  in drivers\net\dsa\mv88e6xxx
>>> Its odd you need VLANs. Each port should already be exposed to the
>>> host as netdev interfaces. That is what DSA does.
>>>
>>>        Andrew
>> Hi Andrew
>>     I'll read further on that one as this is the first time I've had to dig
>> into this side of the system.
>> It had always "just worked".
>> The ports show up in an 'ip l' list in the same style as a vlan with an @
>> symbol, naming isn't quite vlan style though.
>> That in concert with the fact this 'vlan_feature' line broke things has
>> possibly distorted my view of how they're propagated.
>> It's a rather trimmed down busybox image, so I'm missing some tools I'd
>> usually use to examine stuff.
>>
>> This is the config in the dts
>> **************************************
>> //------------------------------------------------------------------------------
>> // connected to dsa network switch
>> &gmac1 {
>>    clock-names = "stmmaceth", "clk_ptp_ref";
> Just a side note irrelevant to the topic. You might be interested to
> know STMMAC driver expects to have the PTP reference clock source
> passed with the "ptp_ref" name, not "clk_ptp_ref".
>
> -Serge(y)
Cheers for that Surge
The dts for this device hasn't been updated in a while!
It was based on a 4.7 series kernel
I vaguely remember coming across this change on clock naming a while 
back when dealing with a pll device driver but looks like we missed this 
one!
Good catch

  Cheers Richard
>>    clocks = <&emac1_clk &hps_eosc1>;
>>    f2h_ptp_ref_clk;
>>    fixed-link {
>>      speed = <1000>;
>>      full-duplex;
>>    };
>> };
>>
>> //------------------------------------------------------------------------------
>> &mdio1 {
>>    #address-cells = <1>;
>>    #size-cells = <0>;
>>
>>    switch0: switch0@0 {
>>      compatible = "marvell,mv88e6085";
>>      #address-cells = <1>;
>>      reg = <0>;
>>      //reset-gpios = <&pio_a0 2 GPIO_ACTIVE_LOW>;
>>
>>      dsa,member = <0 0>;
>>
>>      ports {
>>        #address-cells = <1>;
>>        #size-cells = <0>;
>>
>>        port@2 {
>>          reg = <2>;
>>          label = "lan1";
>>          phy-handle = <&switch1phy2>;
>>        };
>>
>>        port@3 {
>>          reg = <3>;
>>          label = "lan2";
>>          phy-handle = <&switch1phy3>;
>>        };
>>
>>        port@4 {
>>          reg = <4>;
>>          label = "lan3";
>>          phy-handle = <&switch1phy4>;
>>        };
>>
>>        port@5 {
>>          reg = <5>;
>>          label = "wifi";
>>          fixed-link {
>>            speed = <100>;
>>            full-duplex;
>>          };
>>        };
>>
>>        port@6 {
>>          reg = <6>;
>>          label = "cpu";
>>          ethernet = <&gmac1>;
>>          fixed-link {
>>            speed = <1000>;
>>            full-duplex;
>>          };
>>        };
>>
>>      };
>>
>>      mdio {
>>        #address-cells = <1>;
>>        #size-cells = <0>;
>>        switch1phy2: switch1phy2@2 {
>>          reg = <2>;
>>          marvell,reg-init = <0 0x10 0 0x0200>; // Sense only on Rx Energy
>> Detect, no FLPs sents
>>        };
>>        switch1phy3: switch1phy3@3 {
>>          reg = <3>;
>>          marvell,reg-init = <0 0x10 0 0x0200>; // Sense only on Rx Energy
>> Detect, no FLPs sents
>>        };
>>        switch1phy4: switch1phy4@4 {
>>          reg = <4>;
>>          marvell,reg-init = <0 0x10 0 0x0200>; // Sense only on Rx Energy
>> Detect, no FLPs sents
>>        };
>>      };
>>
>>      };
>> };
>> *************************************************
>>
>> This is how they appear using 'ip l'
>> The @ symbol got me as I've usually associated this with vlan's in my day to
>> day networking.
>> But the config files don't configure them as vlans.
>> *************************************************
>> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue qlen 1000
>>      link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
>> 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1508 qdisc mq qlen 1000
>>      link/ether 04:91:62:cf:4f:06 brd ff:ff:ff:ff:ff:ff
>> 3: sit0@...E: <NOARP> mtu 1480 qdisc noop qlen 1000
>>      link/sit 0.0.0.0 brd 0.0.0.0
>> 4: lan1@...0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue
>> qlen 1000
>>      link/ether 04:91:62:cf:4f:06 brd ff:ff:ff:ff:ff:ff
>> 5: lan2@...0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue qlen
>> 1000
>>      link/ether 04:91:62:cf:4f:06 brd ff:ff:ff:ff:ff:ff
>> 6: lan3@...0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue
>> qlen 1000
>>      link/ether 04:91:62:cf:4f:06 brd ff:ff:ff:ff:ff:ff
>> 7: wifi@...0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue qlen
>> 1000
>>      link/ether 04:91:62:cf:4f:06 brd ff:ff:ff:ff:ff:ff
>>
>> *************************************************
>>
>> And these are the systemd config files
>> No vlan mentioned in there..
>> *************************************************
>> /etc/systemd/network/eth0.network
>> [Match]
>> Name=eth0
>>
>> [Network]
>>
>> /etc/systemd/network/lan.network
>> [Match]
>> Name=lan*
>>
>> [Network]
>> DHCP=yes
>> BindCarrier=eth0
>> LinkLocalAddressing=yes
>>
>> [DHCP]
>> UseDomains=yes
>> ClientIdentifier=mac
>>
>> *************************************************
>>
>> Cheers
>>     Richard
>>
>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ