From: Lukas Wunner <lukas@wunner•de>
To: "David S. Miller" <davem@davemloft•net>,
Jakub Kicinski <kuba@kernel•org>, Paolo Abeni <pabeni@redhat•com>,
Eric Dumazet <edumazet@google•com>
Cc: netdev@vger•kernel.org, linux-usb@vger•kernel.org,
Steve Glendinning <steve.glendinning@shawell•net>,
UNGLinuxDriver@microchip•com, Oliver Neukum <oneukum@suse•com>,
Andre Edich <andre.edich@microchip•com>,
Oleksij Rempel <o.rempel@pengutronix•de>,
Oleksij Rempel <linux@rempel-privat•de>,
Martyn Welch <martyn.welch@collabora•com>,
Gabriel Hojda <ghojda@yo2urs•ro>,
Christoph Fritz <chf.fritz@googlemail•com>,
Lino Sanfilippo <LinoSanfilippo@gmx•de>,
Philipp Rosenberger <p.rosenberger@kunbus•com>,
Marek Szyprowski <m.szyprowski@samsung•com>,
Ferry Toth <fntoth@gmail•com>, Andrew Lunn <andrew@lunn•ch>,
Alan Stern <stern@rowland•harvard.edu>
Subject: [PATCH net-next v2 0/3] Deadlock no more in LAN95xx
Date: Fri, 1 Jul 2022 22:47:50 +0200 [thread overview]
Message-ID: <cover.1656707954.git.lukas@wunner.de> (raw)
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
next reply other threads:[~2022-07-01 20:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-01 20:47 Lukas Wunner [this message]
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
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=cover.1656707954.git.lukas@wunner.de \
--to=lukas@wunner$(echo .)de \
--cc=LinoSanfilippo@gmx$(echo .)de \
--cc=UNGLinuxDriver@microchip$(echo .)com \
--cc=andre.edich@microchip$(echo .)com \
--cc=andrew@lunn$(echo .)ch \
--cc=chf.fritz@googlemail$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=fntoth@gmail$(echo .)com \
--cc=ghojda@yo2urs$(echo .)ro \
--cc=kuba@kernel$(echo .)org \
--cc=linux-usb@vger$(echo .)kernel.org \
--cc=linux@rempel-privat$(echo .)de \
--cc=m.szyprowski@samsung$(echo .)com \
--cc=martyn.welch@collabora$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=o.rempel@pengutronix$(echo .)de \
--cc=oneukum@suse$(echo .)com \
--cc=p.rosenberger@kunbus$(echo .)com \
--cc=pabeni@redhat$(echo .)com \
--cc=stern@rowland$(echo .)harvard.edu \
--cc=steve.glendinning@shawell$(echo .)net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox