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:   Mon, 27 Feb 2023 20:43:12 +0100
From:   Wolfram Sang <wsa+renesas@...g-engineering.com>
To:     Heiner Kallweit <hkallweit1@...il.com>
Cc:     linux-renesas-soc@...r.kernel.org, Andrew Lunn <andrew@...n.ch>,
        Russell King <linux@...linux.org.uk>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [REGRESSION PATCH RFC] net: phy: don't resume PHY via MDIO when
 iface is not up

Hello Heiner,

> > This may be a problem in itself, but I then wondered why
> > mdio_bus_phy_resume() gets called anyhow because the RAVB driver sets
> > 'phydev->mac_managed_pm = true' so once the interface is up
> > mdio_bus_phy_resume() never gets called. But again, the interface was
> > not up yet, so mac_managed_pm was not set yet.
> > 
> Setting phydev->mac_managed_pm in the open() callback is too late.
> It should be set as soon as the phydev is created. That's in
> ravb_mdio_init() after the call to of_mdiobus_register().
> 
> It should be possible to get the phydev with:
> pn = of_parse_phandle(np, "phy-handle", 0);
> phy = of_phy_find_device(pn);

Awesome, thank you very much for the pointer. I applied setting
'mac_managed_pm' at probe time, and now I can resume successfully.
Sadly, this is only the first part of the problem. I still can't get the
interface up after resuming, but I still need to debug this further.
At least, the problem with mdiobus_resume getting called is fixed now.

Thank you for your help!

   Wolfram


Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ