linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/2] net: ipa: prevent shutdown during setup
@ 2021-11-23  0:15 Alex Elder
  2021-11-23  0:15 ` [PATCH net 1/2] net: ipa: directly disable ipa-setup-ready interrupt Alex Elder
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Alex Elder @ 2021-11-23  0:15 UTC (permalink / raw)
  To: davem, kuba
  Cc: pkurapat, avuyyuru, bjorn.andersson, cpratapa, subashab, evgreen,
	elder, netdev, linux-arm-msm, linux-kernel

The setup phase of the IPA driver occurs in one of two ways.
Normally, it is done directly by the main driver probe function.
But some systems (those having a "modem-init" DTS property) don't
start setup until an SMP2P interrupt (sent by the modem) arrives.

Because it isn't performed by the probe function, setup on
"modem-init" systems could be underway at the time a driver
remove (or shutdown) request arrives (or vice-versa).  This
situation can lead to hardware state not being cleaned up
properly.

This series addresses this problem by having the driver remove
function disable the setup interrupt.  A consequence of this is
that setup will complete if it is underway when the remove function
is called.

So now, when removing the driver, setup:
  - will have already completed;
  - is underway, and will complete before proceeding; or
  - will not have begun (and will not occur).

					-Alex

PS  These patches might not back-port cleanly; I'll gladly provide
    equivalent code for older kernel releases if needed.

Alex Elder (2):
  net: ipa: directly disable ipa-setup-ready interrupt
  net: ipa: separate disabling setup from modem stop

 drivers/net/ipa/ipa_main.c  |  6 ++++++
 drivers/net/ipa/ipa_modem.c |  6 +++---
 drivers/net/ipa/ipa_smp2p.c | 21 ++++++++++-----------
 drivers/net/ipa/ipa_smp2p.h |  7 +++----
 4 files changed, 22 insertions(+), 18 deletions(-)

-- 
2.32.0


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

end of thread, other threads:[~2021-11-24 18:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-23  0:15 [PATCH net 0/2] net: ipa: prevent shutdown during setup Alex Elder
2021-11-23  0:15 ` [PATCH net 1/2] net: ipa: directly disable ipa-setup-ready interrupt Alex Elder
2021-11-24 18:37   ` Matthias Kaehlcke
2021-11-23  0:15 ` [PATCH net 2/2] net: ipa: separate disabling setup from modem stop Alex Elder
2021-11-23 12:20 ` [PATCH net 0/2] net: ipa: prevent shutdown during setup 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).