From: Andrew Lunn <andrew@lunn.ch>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>
Cc: Frank <Frank.Sae@motor-comm.com>,
Peter Geis <pgwipeout@gmail.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
yinghong.zhang@motor-comm.com, fei.zhang@motor-comm.com,
hua.sun@motor-comm.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] net: phy: Add driver for Motorcomm yt8531 gigabit ethernet phy
Date: Wed, 30 Nov 2022 18:10:42 +0100 [thread overview]
Message-ID: <Y4eOkiaRywaUJa9n@lunn.ch> (raw)
In-Reply-To: <Y4copjAzKpGSeunB@shell.armlinux.org.uk>
On Wed, Nov 30, 2022 at 09:55:50AM +0000, Russell King (Oracle) wrote:
> On Wed, Nov 30, 2022 at 05:49:28PM +0800, Frank wrote:
> > +/**
> > + * yt8531_set_wol() - turn wake-on-lan on or off
> > + * @phydev: a pointer to a &struct phy_device
> > + * @wol: a pointer to a &struct ethtool_wolinfo
> > + *
> > + * NOTE: YTPHY_WOL_CONFIG_REG, YTPHY_WOL_MACADDR2_REG, YTPHY_WOL_MACADDR1_REG
> > + * and YTPHY_WOL_MACADDR0_REG are common ext reg.
> > + *
> > + * returns 0 or negative errno code
> > + */
> > +static int yt8531_set_wol(struct phy_device *phydev,
> > + struct ethtool_wolinfo *wol)
> > +{
>
> So this is called from the .set_wol method directly, and won't have the
> MDIO bus lock taken...
Hi Frank
This is not the first time Russell has pointed out your locking is
wrong.
How about adding a check in functions which should be called with the
lock taken really do have the lock taken?
ASSERT_RTNL() but for an MDIO bus.
Andrew
next prev parent reply other threads:[~2022-11-30 17:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-30 9:49 [PATCH net-next] net: phy: Add driver for Motorcomm yt8531 gigabit ethernet phy Frank
2022-11-30 9:55 ` Russell King (Oracle)
2022-11-30 17:10 ` Andrew Lunn [this message]
2022-11-30 17:33 ` Russell King (Oracle)
2022-11-30 18:19 ` Andrew Lunn
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=Y4eOkiaRywaUJa9n@lunn.ch \
--to=andrew@lunn.ch \
--cc=Frank.Sae@motor-comm.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fei.zhang@motor-comm.com \
--cc=hkallweit1@gmail.com \
--cc=hua.sun@motor-comm.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pgwipeout@gmail.com \
--cc=yinghong.zhang@motor-comm.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.