netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/3] Deadlock no more in LAN95xx
@ 2022-07-01 20:47 Lukas Wunner
  2022-07-01 20:47 ` [PATCH net-next v2 1/3] usbnet: smsc95xx: Fix deadlock on runtime resume Lukas Wunner
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Lukas Wunner @ 2022-07-01 20:47 UTC (permalink / raw)
  To: David S. Miller, Jakub Kicinski, Paolo Abeni, Eric Dumazet
  Cc: netdev, linux-usb, Steve Glendinning, UNGLinuxDriver,
	Oliver Neukum, Andre Edich, Oleksij Rempel, Oleksij Rempel,
	Martyn Welch, Gabriel Hojda, Christoph Fritz, Lino Sanfilippo,
	Philipp Rosenberger, Marek Szyprowski, Ferry Toth, Andrew Lunn,
	Alan Stern

Second attempt at fixing a runtime resume deadlock in the LAN95xx USB driver:

In short, the driver isn't using the "nopm" register accessors in portions
of its runtime resume path, causing a deadlock.  I'm fixing that by
auto-detecting whether nopm accessors shall be used, instead of
having to explicitly call them wherever it's necessary.
As a byproduct, code size shrinks significantly (see diffstat below).

Back in April I submitted a first attempt which was rejected by Alan Stern:
https://lore.kernel.org/all/6710d8c18ff54139cdc538763ba544187c5a0cee.1651041411.git.lukas@wunner.de/

That approach only detected whether a PM callback is running concurrently,
not whether the access is performed by the PM callback.  I've come up with
a different approach which should resolve the objection (see patch [1/3]).

Thanks!

Lukas Wunner (3):
  usbnet: smsc95xx: Fix deadlock on runtime resume
  usbnet: smsc95xx: Clean up nopm handling
  usbnet: smsc95xx: Clean up unnecessary BUG_ON() upon register access

 drivers/net/usb/smsc95xx.c | 202 ++++++++++++++++---------------------
 1 file changed, 86 insertions(+), 116 deletions(-)

-- 
2.36.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-07-04  9:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-01 20:47 [PATCH net-next v2 0/3] Deadlock no more in LAN95xx Lukas Wunner
2022-07-01 20:47 ` [PATCH net-next v2 1/3] usbnet: smsc95xx: Fix deadlock on runtime resume Lukas Wunner
2022-07-01 20:47 ` [PATCH net-next v2 2/3] usbnet: smsc95xx: Clean up nopm handling Lukas Wunner
2022-07-01 20:47 ` [PATCH net-next v2 3/3] usbnet: smsc95xx: Clean up unnecessary BUG_ON() upon register access Lukas Wunner
2022-07-04  9:50 ` [PATCH net-next v2 0/3] Deadlock no more in LAN95xx patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).