From: Andrew Lunn <andrew@lunn.ch>
To: Russell King - ARM Linux admin <linux@armlinux.org.uk>
Cc: Michael Walle <michael@walle.cc>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
Florian Fainelli <f.fainelli@gmail.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
"David S . Miller" <davem@davemloft.net>,
Vladimir Oltean <vladimir.oltean@nxp.com>
Subject: Re: [RFC PATCH net-next 1/3] net: phy: add concept of shared storage for PHYs
Date: Tue, 21 Apr 2020 16:52:14 +0200 [thread overview]
Message-ID: <20200421145214.GD933345@lunn.ch> (raw)
In-Reply-To: <20200421144302.GD25745@shell.armlinux.org.uk>
On Tue, Apr 21, 2020 at 03:43:02PM +0100, Russell King - ARM Linux admin wrote:
> On Tue, Apr 21, 2020 at 04:34:55PM +0200, Andrew Lunn wrote:
> > > +static inline bool phy_package_init_once(struct phy_device *phydev)
> > > +{
> > > + struct phy_package_shared *shared = phydev->shared;
> > > +
> > > + if (!shared)
> > > + return false;
> > > +
> > > + return !test_and_set_bit(PHY_SHARED_F_INIT_DONE, &shared->flags);
> > > +}
> >
> > I need to look at how you actually use this, but i wonder if this is
> > sufficient. Can two PHYs probe at the same time? Could we have one PHY
> > be busy setting up the global init, and the other thinks the global
> > setup is complete? Do we want a comment like: 'Returns true when the
> > global package initialization is either under way or complete'?
>
> IIRC, probe locking in the driver model is by per-driver locks, so
> any particular driver won't probe more than one device at a time.
Hi Russel
Cool, thanks for the info.
Andrew
next prev parent reply other threads:[~2020-04-21 14:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-20 23:26 [RFC PATCH net-next 1/3] net: phy: add concept of shared storage for PHYs Michael Walle
2020-04-20 23:26 ` [RFC PATCH net-next 2/3] net: phy: bcm54140: use phy_package_shared Michael Walle
2020-04-20 23:26 ` [RFC PATCH net-next 3/3] net: phy: mscc: " Michael Walle
2020-04-23 12:27 ` Vladimir Oltean
2020-04-21 14:34 ` [RFC PATCH net-next 1/3] net: phy: add concept of shared storage for PHYs Andrew Lunn
2020-04-21 14:43 ` Russell King - ARM Linux admin
2020-04-21 14:52 ` Andrew Lunn [this message]
2020-04-21 15:20 ` Michael Walle
2020-04-21 15:25 ` Michael Walle
2020-04-21 15:50 ` Andrew Lunn
2020-04-21 19:08 ` Michael Walle
2020-04-21 19:30 ` Andrew Lunn
2020-04-21 19:38 ` Russell King - ARM Linux admin
2020-04-21 21:19 ` Michael Walle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200421145214.GD933345@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=michael@walle.cc \
--cc=netdev@vger.kernel.org \
--cc=vladimir.oltean@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.