[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <09a5d7bd-d020-47d5-9a02-fdbbca7bb62b@lunn.ch>
Date: Wed, 6 Sep 2023 14:59:38 +0200
From: Andrew Lunn <andrew@...n.ch>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
Cc: Jijie Shao <shaojijie@...wei.com>, f.fainelli@...il.com,
davem@...emloft.net, edumazet@...gle.com, hkallweit1@...il.com,
kuba@...nel.org, netdev@...r.kernel.org, pabeni@...hat.com,
"shenjian15@...wei.com" <shenjian15@...wei.com>,
"liuyonglong@...wei.com" <liuyonglong@...wei.com>,
wangjie125@...wei.com, chenhao418@...wei.com,
Hao Lan <lanhao@...wei.com>,
"wangpeiyang1@...wei.com" <wangpeiyang1@...wei.com>
Subject: Re: [PATCH net-next] net: phy: avoid kernel warning dump when
stopping an errored PHY
> Having looked deeper at this, I think there may be a solution. See
> these follow-on patches.
Hi Russell
I'm on vacation at the moment with limited time and network access.
> Move the call to phy_suspend() to the end of phy_state_machine() after
> we release the lock.
I know this is a quick RFC exploration of the problem space, but it
would be good to comment about 'Why?'. Suspend and resume has had
deadlock issues in the past, which is why they don't take the lock.
> Split out the locked and unlocked sections of phy_state_machine() into
> two separate functions which can be called inside the phydev lock and
> outside the phydev lock as appropriate.
Again, i think some mention of suspend/resume would be good, since
that is what is causing these issues. Maybe we also need to add a
comment next to struct phy_device lock about what the lock should be
protecting.
Andrew
Powered by blists - more mailing lists