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: <CAPv3WKfWqdpntPKknZ+H+sscyH9mursvCUwe8Q1DH-wGpsWknQ@mail.gmail.com>
Date:   Sun, 13 Jun 2021 23:21:44 +0200
From:   Marcin Wojtas <mw@...ihalf.com>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        netdev <netdev@...r.kernel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Russell King - ARM Linux <linux@...linux.org.uk>,
        Grzegorz Jaszczyk <jaz@...ihalf.com>,
        Grzegorz Bernacki <gjb@...ihalf.com>, upstream@...ihalf.com,
        Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@....com>,
        Jon Nettleton <jon@...id-run.com>
Subject: Re: [net-next: PATCH 2/3] net: mvpp2: enable using phylink with ACPI

Hi,

niedz., 13 cze 2021 o 21:47 Andrew Lunn <andrew@...n.ch> napisaƂ(a):
>
> > +static bool mvpp2_use_acpi_compat_mode(struct fwnode_handle *port_fwnode)
> > +{
> > +     if (!is_acpi_node(port_fwnode))
> > +             return false;
> > +
> > +     return (!fwnode_property_present(port_fwnode, "phy-handle") &&
> > +             !fwnode_property_present(port_fwnode, "managed") &&
> > +             !fwnode_get_named_child_node(port_fwnode, "fixed-link"));
>
> fixed-link and managed are not documented in
> Documentation/firmware-guide/acpi/dsd/phy.rst.

True. I picked the port type properties that are interpreted by
phylink. Basically, I think that everything that's described in:
devicetree/bindings/net/ethernet-controller.yaml
is valid for the ACPI as well - the kernel already is using 'fwnode_'
in most (if not all) cases.

Would you like me to add "managed" and "fixed-link"
description/examples to the mentioned file?

>
> Also, should you be looking for phy-mode?
>

In the beginning of the mvpp2_port_probe, there's:

        phy_mode = fwnode_get_phy_mode(port_fwnode);
        if (phy_mode < 0) {
                dev_err(&pdev->dev, "incorrect phy mode\n");
                err = phy_mode;
                goto err_free_netdev;
        }

So we won't reach further checks in case anything is wrong with it.

Best regards,
Marcin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ