linux-stable/drivers/bus
Manivannan Sadhasivam bc95dbf550 bus: mhi: core: Fix race while handling SYS_ERR at power up
commit d651ce8e91 upstream.

During SYS_ERR condition, as a response to the MHI_RESET from host, some
devices tend to issue BHI interrupt without clearing the SYS_ERR state in
the device. This creates a race condition and causes a failure in booting
up the device.

The issue is seen on the Sierra Wireless EM9191 modem during SYS_ERR
handling in mhi_async_power_up(). Once the host detects that the device
is in SYS_ERR state, it issues MHI_RESET and waits for the device to
process the reset request. During this time, the device triggers the BHI
interrupt to the host without clearing SYS_ERR condition. So the host
starts handling the SYS_ERR condition again.

To fix this issue, let's register the IRQ handler only after handling the
SYS_ERR check to avoid getting spurious IRQs from the device.

Fixes: e18d4e9fa7 ("bus: mhi: core: Handle syserr during power_up")
Cc: stable@vger.kernel.org
Reported-by: Aleksander Morgado <aleksander@aleksander.es>
Tested-by: Aleksander Morgado <aleksander@aleksander.es>
Tested-by: Thomas Perrot <thomas.perrot@bootlin.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20211216081227.237749-8-manivannan.sadhasivam@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-27 11:02:58 +01:00
..
fsl-mc Char / Misc driver changes for 5.15-rc1 2021-09-01 08:35:06 -07:00
mhi bus: mhi: core: Fix race while handling SYS_ERR at power up 2022-01-27 11:02:58 +01:00
arm-cci.c
arm-integrator-lm.c bus: arm-integrator-lm: Add of_node_put() before return statement 2021-01-15 17:53:05 +01:00
brcmstb_gisb.c kernel.h: split out panic and oops helpers 2021-07-01 11:06:04 -07:00
bt1-apb.c bus: bt1-apb: Use sysfs_streq instead of strncmp 2020-05-28 16:56:56 +02:00
bt1-axi.c bus: bt1-axi: Use sysfs_streq instead of strncmp 2020-05-28 16:57:12 +02:00
da8xx-mstpri.c
hisi_lpc.c
imx-weim.c
intel-ixp4xx-eb.c bus: ixp4xx: return on error in ixp4xx_exp_probe() 2021-08-12 22:34:13 +02:00
Kconfig drivers: bus: Delete CONFIG_SIMPLE_PM_BUS 2021-10-05 17:47:22 +02:00
Makefile drivers: bus: Delete CONFIG_SIMPLE_PM_BUS 2021-10-05 17:47:22 +02:00
mips_cdmm.c mips: cdmm: fix use-after-free in mips_cdmm_bus_discover 2020-11-27 10:38:02 +01:00
moxtet.c treewide: change my e-mail address, fix my name 2021-04-09 14:54:23 -07:00
mvebu-mbus.c ARM: mvebu: avoid clang -Wtautological-constant warning 2021-04-01 16:32:38 +02:00
omap-ocp2scp.c
omap_l3_noc.c bus: omap_l3_noc: mark l3 irqs as IRQF_NO_THREAD 2021-02-04 09:08:57 +02:00
omap_l3_noc.h
omap_l3_smx.c
omap_l3_smx.h
qcom-ebi2.c bus: qcom-ebi2: Fix incorrect documentation for '{slow,fast}_cfg' 2021-05-26 21:19:23 -05:00
simple-pm-bus.c drivers: bus: simple-pm-bus: Add support for probing simple bus only devices 2021-10-05 17:47:15 +02:00
sun50i-de2.c
sunxi-rsb.c bus: sunxi-rsb: Fix shutdown 2021-12-29 12:28:38 +01:00
tegra-aconnect.c
tegra-gmi.c
ti-pwmss.c
ti-sysc.c bus: ti-sysc: Fix variable set but not used warning for reinit_modules 2021-12-22 09:32:51 +01:00
ts-nbus.c
uniphier-system-bus.c
vexpress-config.c