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] [day] [month] [year] [list]
Date:   Sat, 6 Feb 2021 22:44:35 +0530
From:   Calvin Johnson <calvin.johnson@....nxp.com>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     Grant Likely <grant.likely@....com>,
        "Rafael J . Wysocki" <rafael@...nel.org>,
        Jeremy Linton <jeremy.linton@....com>,
        Andrew Lunn <andrew@...n.ch>,
        Florian Fainelli <f.fainelli@...il.com>,
        Russell King - ARM Linux admin <linux@...linux.org.uk>,
        Cristi Sovaiala <cristian.sovaiala@....com>,
        Florin Laurentiu Chiculita <florinlaurentiu.chiculita@....com>,
        Ioana Ciornei <ioana.ciornei@....com>,
        Madalin Bucur <madalin.bucur@....nxp.com>,
        Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
        Marcin Wojtas <mw@...ihalf.com>,
        Pieter Jansen Van Vuuren <pieter.jansenvv@...boosystems.io>,
        Jon <jon@...id-run.com>, Saravana Kannan <saravanak@...gle.com>,
        Randy Dunlap <rdunlap@...radead.org>,
        "linux.cj" <linux.cj@...il.com>,
        Diana Madalina Craciun <diana.craciun@....com>,
        ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
        linux-arm Mailing List <linux-arm-kernel@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        netdev <netdev@...r.kernel.org>,
        Laurentiu Tudor <laurentiu.tudor@....com>,
        "David S. Miller" <davem@...emloft.net>,
        Frank Rowand <frowand.list@...il.com>,
        Heiner Kallweit <hkallweit1@...il.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        devicetree <devicetree@...r.kernel.org>
Subject: Re: [net-next PATCH v4 07/15] net: mdiobus: Introduce
 fwnode_mdiobus_register_phy()

On Fri, Feb 05, 2021 at 08:58:06PM +0200, Andy Shevchenko wrote:
> On Fri, Feb 5, 2021 at 8:41 PM Andy Shevchenko
> <andy.shevchenko@...il.com> wrote:
> > On Fri, Feb 5, 2021 at 8:25 PM Andy Shevchenko
> > <andy.shevchenko@...il.com> wrote:
> > > On Fri, Feb 5, 2021 at 7:25 PM Calvin Johnson
> > > <calvin.johnson@....nxp.com> wrote:
> > > > On Fri, Jan 22, 2021 at 09:12:52PM +0530, Calvin Johnson wrote:
> > >
> > > ...
> > >
> > > > > +     rc = fwnode_property_match_string(child, "compatible", "ethernet-phy-ieee802.3-c45");
> > > > With ACPI, I'm facing some problem with fwnode_property_match_string(). It is
> > > > unable to detect the compatible string and returns -EPROTO.
> > > >
> > > > ACPI node for PHY4 is as below:
> > > >
> > > >  Device(PHY4) {
> > > >     Name (_ADR, 0x4)
> > > >     Name(_CRS, ResourceTemplate() {
> > > >     Interrupt(ResourceConsumer, Level, ActiveHigh, Shared)
> > > >     {
> > > >       AQR_PHY4_IT
> > > >     }
> > > >     }) // end of _CRS for PHY4
> > > >     Name (_DSD, Package () {
> > > >       ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
> > > >         Package () {
> >
> > > >           Package () {"compatible", "ethernet-phy-ieee802.3-c45"}
> >
> > I guess converting this to
> >            Package () {"compatible", Package() {"ethernet-phy-ieee802.3-c45"}}
> > will solve it.

Thanks a lot Andy! This helped. But is this the correct way to define compatible
string value, i.e as a sub package. 
> 
> For the record, it doesn't mean there is no bug in the code. DT treats
> a single string as an array, but ACPI doesn't.
> And this is specific to _match_string() because it has two passes. And
> the first one fails.
> While reading a single string as an array of 1 element will work I believe.
> 
> > > >        }
> >
> > > >     })
> > > >   } // end of PHY4
> > > >
> > > >  What is see is that in acpi_data_get_property(),
> > > > propvalue->type = 0x2(ACPI_TYPE_STRING) and type = 0x4(ACPI_TYPE_PACKAGE).
> > > >
> > > > Any help please?
> > > >
> > > > fwnode_property_match_string() works fine for DT.
> > >
> > > Can you show the DT node which works and also input for the
> > > )match_string() (i.o.w what exactly you are trying to match with)?
> 
> 
> -- 
> With Best Regards,
> Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ