Subject: Re: [PATCH net v3] net: ethtool: do runtime PM outside RTNL

From: Jakub Kicinski <[email-masked]>
Date: Wed, 6 Dec 2023 08:44:48 -0800

On Wed,  6 Dec 2023 11:39:32 +0100 Johannes Berg wrote:
> As reported by Marc MERLIN, at least one driver (igc) wants or
> needs to acquire the RTNL inside suspend/resume ops, which can
> be called from here in ethtool if runtime PM is enabled.
> 
> Allow this by doing runtime PM transitions without the RTNL
> held. For the ioctl to have the same operations order, this
> required reworking the code to separately check validity and
> do the operation. For the netlink code, this now has to do
> the runtime_pm_put a bit later.

I was really, really hoping that this would serve as a motivation
for Intel to sort out the igb/igc implementation. The flow AFAICT
is ndo_open() starts the NIC, the calls pm_sus, which shuts the NIC
back down immediately (!?) then it schedules a link check from a work
queue, which opens it again (!?). It's a source of never ending bugs.

nit: please don't repost within 24h on netdev:
https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#tl-dr