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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 20 Nov 2020 01:11:12 +0100
From:   Tobias Waldekranz <tobias@...dekranz.com>
To:     Russell King - ARM Linux admin <linux@...linux.org.uk>
Cc:     Maxime Chevallier <maxime.chevallier@...tlin.com>,
        Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Heiner Kallweit <hkallweit1@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Antoine Tenart <atenart@...nel.org>,
        Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
        netdev@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: net: phy: Dealing with 88e1543 dual-port mode

On Thu, Nov 19, 2020 at 23:16, Russell King - ARM Linux admin <linux@...linux.org.uk> wrote:
> On Thu, Nov 19, 2020 at 11:43:39PM +0100, Tobias Waldekranz wrote:
>> On Thu, Nov 19, 2020 at 16:24, Maxime Chevallier <maxime.chevallier@...tlin.com> wrote:
>> > I don't think we have a way to distinguish from the DT if we are in
>> > SGMII-to-Fibre or in SGMII-to-{Copper + Fibre}, since the description is
>> > the same, we don't have any information in DT about wether or not the
>> > PHY is wired to a Copper RJ45 port.
>> >
>> > Maybe we should have a way to indicate if a PHY is wired to a Copper
>> > port in DT ?
>> 
>> Do you mean something like:
>> 
>> SGMII->SGMII (Fibre):
>> ethernet-phy@0 {
>>    sfp = <&sfp0>;
>> };
>> 
>> SGMII->MDI (Copper):
>> ethernet-phy@0 {
>>     mdi;
>> };
>> 
>> SGMII->Auto Media Detect
>> ethernet-phy@0 {
>>     mdi;
>>     sfp = <&sfp0>;
>> };
>
> This isn't something we could realistically do - think about how many
> DT files are out there today which would not have this for an existing
> PHY. The default has to be that today's DT descriptions continue to work
> as-is, and that includes ones which already support copper and fibre
> either with or without a sfp property.
>
> So, we can't draw any conclusion about whether the fiber interface is
> wired from whether there is a sfp property or not.
>
> We also can't draw a conclusion about whether the copper side is wired
> using a "mdi" property, or whether there is a "sfp" property or not.
>
> The only thing we could realistically do today is to introduce a
> property like:
>
> 	mdi = "disabled" | "okay";
>
> to indicate whether the copper port can be used, and maybe something
> similar for the fiber interface.  Maybe as you suggest, not "okay"
> but specifying the number of connected pairs would be a good idea,
> or maybe that should be a separate property?

Maybe you could have optional media nodes under the PHY instead, so that
you don't involve the SFP property in the logic (SGMII can be connected
to lots of things after all):

    ethernet-phy@0 {
        ...

        sgmii {
            status = "okay";
            preferred;
        };

        mdi {
           status = "okay";
           pairs = <2>;
        };
    };

In the absence of any media declarations, you fall back to the driver's
default behavior (keeping compatibility with older DTs). But you can
still add support for more configurations if the information is
available.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ