linux-stable/drivers/net/ipa
Alex Elder e4e9bfb7c9 net: ipa: kill ipa_cmd_pipeline_clear()
Calling ipa_cmd_pipeline_clear() after stopping the channel
underlying the AP<-modem RX endpoint can lead to a deadlock.

This occurs in the ->runtime_suspend device power operation for the
IPA driver.  While this callback is in progress, any other requests
for power will block until the callback returns.

Stopping the AP<-modem RX channel does not prevent the modem from
sending another packet to this endpoint.  If a packet arrives for an
RX channel when the channel is stopped, an SUSPEND IPA interrupt
condition will be pending.  Handling an IPA interrupt requires
power, so ipa_isr_thread() calls pm_runtime_get_sync() first thing.

The problem occurs because a "pipeline clear" command will not
complete while such a SUSPEND interrupt condition exists.  So the
SUSPEND IPA interrupt handler won't proceed until it gets power;
that won't happen until the ->runtime_suspend callback (and its
"pipeline clear" command) completes; and that can't happen while
the SUSPEND interrupt condition exists.

It turns out that in this case there is no need to use the "pipeline
clear" command.  There are scenarios in which clearing the pipeline
is required while suspending, but those are not (yet) supported
upstream.  So a simple fix, avoiding the potential deadlock, is to
stop calling ipa_cmd_pipeline_clear() in ipa_endpoint_suspend().
This removes the only user of ipa_cmd_pipeline_clear(), so get rid
of that function.  It can be restored again whenever it's needed.

This is basically a manual revert along with an explanation for
commit 6cb63ea6a3 ("net: ipa: introduce ipa_cmd_tag_process()").

Fixes: 6cb63ea6a3 ("net: ipa: introduce ipa_cmd_tag_process()")
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-23 12:26:40 +00:00
..
Kconfig qcom_scm: hide Kconfig symbol 2021-10-07 16:51:57 +02:00
Makefile net: ipa: rename "ipa_clock.c" 2021-08-22 09:44:17 +01:00
gsi.c net: ipa: disable GSI interrupts while suspended 2021-08-04 10:12:05 +01:00
gsi.h net: ipa: disable GSI interrupts while suspended 2021-08-04 10:12:05 +01:00
gsi_private.h net: ipa: DMA addresses are nicely aligned 2021-03-28 18:12:03 -07:00
gsi_reg.h net: ipa: inter-EE interrupts aren't always available 2021-06-21 12:30:59 -07:00
gsi_trans.c net: ipa: use WARN_ON() rather than assertions 2021-07-26 22:38:11 +01:00
gsi_trans.h net: ipa: fix all kernel-doc warnings 2021-03-28 18:12:03 -07:00
ipa.h net: ipa: rename ipa_clock_* symbols 2021-08-22 09:44:17 +01:00
ipa_cmd.c net: ipa: kill ipa_cmd_pipeline_clear() 2021-11-23 12:26:40 +00:00
ipa_cmd.h net: ipa: kill ipa_cmd_pipeline_clear() 2021-11-23 12:26:40 +00:00
ipa_data-v3.1.c net: ipa: rename ipa_clock_* symbols 2021-08-22 09:44:17 +01:00
ipa_data-v3.5.1.c net: ipa: rename ipa_clock_* symbols 2021-08-22 09:44:17 +01:00
ipa_data-v4.2.c net: ipa: rename ipa_clock_* symbols 2021-08-22 09:44:17 +01:00
ipa_data-v4.5.c net: ipa: rename ipa_clock_* symbols 2021-08-22 09:44:17 +01:00
ipa_data-v4.9.c net: ipa: rename ipa_clock_* symbols 2021-08-22 09:44:17 +01:00
ipa_data-v4.11.c net: ipa: rename ipa_clock_* symbols 2021-08-22 09:44:17 +01:00
ipa_data.h net: ipa: rename ipa_clock_* symbols 2021-08-22 09:44:17 +01:00
ipa_endpoint.c net: ipa: kill ipa_cmd_pipeline_clear() 2021-11-23 12:26:40 +00:00
ipa_endpoint.h net: ipa: three small fixes 2021-04-09 20:57:26 -07:00
ipa_gsi.c net: ipa: include declarations in "ipa_gsi.c" 2020-07-07 12:43:18 -07:00
ipa_gsi.h net: ipa: fix kerneldoc comments 2020-07-13 17:11:53 -07:00
ipa_interrupt.c net: ipa: use autosuspend 2021-08-22 09:44:17 +01:00
ipa_interrupt.h net: ipa: set up IPA interrupts earlier 2021-07-26 23:09:18 +01:00
ipa_main.c net: ipa: separate disabling setup from modem stop 2021-11-23 12:06:40 +00:00
ipa_mem.c net: ipa: don't index mem data array by ID 2021-06-10 14:50:08 -07:00
ipa_mem.h net: ipa: don't index mem data array by ID 2021-06-10 14:50:08 -07:00
ipa_modem.c net: ipa: separate disabling setup from modem stop 2021-11-23 12:06:40 +00:00
ipa_modem.h net: ipa: kill ipa_modem_setup() 2021-07-26 23:09:18 +01:00
ipa_power.c net: ipa: rename "ipa_clock.c" 2021-08-22 09:44:17 +01:00
ipa_power.h net: ipa: rename "ipa_clock.c" 2021-08-22 09:44:17 +01:00
ipa_qmi.c net: ipa: kill ipa_modem_setup() 2021-07-26 23:09:18 +01:00
ipa_qmi.h net: ipa: kill ipa_modem_setup() 2021-07-26 23:09:18 +01:00
ipa_qmi_msg.c net: ipa: extend the INDICATION_REGISTER request 2021-03-16 11:17:59 -07:00
ipa_qmi_msg.h net: ipa: extend the INDICATION_REGISTER request 2021-03-16 11:17:59 -07:00
ipa_reg.c
ipa_reg.h net: ipa: use WARN_ON() rather than assertions 2021-07-26 22:38:11 +01:00
ipa_resource.c net/ipa: ipa_resource: Fix wrong for loop range 2021-11-12 19:59:45 -08:00
ipa_resource.h net: ipa: get rid of empty IPA functions 2021-04-09 20:57:25 -07:00
ipa_smp2p.c net: ipa: separate disabling setup from modem stop 2021-11-23 12:06:40 +00:00
ipa_smp2p.h net: ipa: separate disabling setup from modem stop 2021-11-23 12:06:40 +00:00
ipa_sysfs.c net: ipa: introduce sysfs code 2021-06-11 14:13:18 -07:00
ipa_sysfs.h net: ipa: introduce sysfs code 2021-06-11 14:13:18 -07:00
ipa_table.c net: ipa: initialize all filter table slots 2021-09-08 12:10:33 +01:00
ipa_table.h net: ipa: always validate filter and route tables 2021-07-26 22:38:11 +01:00
ipa_uc.c net: ipa: rename ipa_clock_* symbols 2021-08-22 09:44:17 +01:00
ipa_uc.h net: ipa: rename ipa_clock_* symbols 2021-08-22 09:44:17 +01:00
ipa_version.h net: ipa: introduce sysfs code 2021-06-11 14:13:18 -07:00