5be8f883fc
There is a possibility of client driver's dev_wake request as part mhi_device_get() racing with M1 state transition event processing. This can result in a scenario where client finds MHI state as M0 after mhi_device_get() returns only to be changed later as M1 event processing is still pending on different CPU core. It causes M0 -> M2 -> M0 state transition after mhi_device_get() has already returned. This isn't expected by client and currently treats that as fatal error. Also, as per MHI spec host must allow M1 -> M2 transition for device and it shouldn't abort that. However, clients can ignore that transition as device is expected to immediately move from M2 to M0 without entering deep sleep state. Hence, it must be safe to access their MMIO. To simplify this logic, introduce mhi_device_get_sync_atomic() function that can be used by clients to achieve the same and once it returns success they don't need to have any explicit MHI state checks. Change-Id: I0b4a1ad723a0444ee2402bf171fc5ffc46afcdce Signed-off-by: Manu Gautam <mgautam@codeaurora.org> |
||
---|---|---|
.. | ||
fsl-mc | ||
mhi | ||
arm-cci.c | ||
brcmstb_gisb.c | ||
da8xx-mstpri.c | ||
hisi_lpc.c | ||
imx-weim.c | ||
Kconfig | ||
Makefile | ||
mips_cdmm.c | ||
moxtet.c | ||
mvebu-mbus.c | ||
omap_l3_noc.c | ||
omap_l3_noc.h | ||
omap_l3_smx.c | ||
omap_l3_smx.h | ||
omap-ocp2scp.c | ||
qcom-ebi2.c | ||
simple-pm-bus.c | ||
sun50i-de2.c | ||
sunxi-rsb.c | ||
tegra-aconnect.c | ||
tegra-gmi.c | ||
ti-sysc.c | ||
ts-nbus.c | ||
uniphier-system-bus.c | ||
vexpress-config.c |