On Thu, 5 Nov 2026 23:28:31 +0100, Vadim Fedorenko wrote: > > This would work, but I am wondering if it would be possible to call > > rtnl inside the _open function, when dealing with the PHY? in other > > words, shrink the time rtnl is held. > > +1, especially in emac_open() rtnl is needed only in error path case emac_open() and emac_stop() are also the driver's .ndo_open and .ndo_stop, which the core already calls with RTNL held, see Documentation/networking/netdevices.rst +214. Taking rtnl_lock() inside them would deadlock on every open and close, so the lock has to stay in the PM callbacks. -- Troy Mitchell