1 | Add device awake calls in case of rproc boot and rproc shutdown path. | 1 | Add device awake calls in case of rproc boot and rproc shutdown path. |
---|---|---|---|
2 | Currently, device awake call is only present in the recovery path | 2 | Currently, device awake call is only present in the recovery path |
3 | of remoteproc. If a user stops and starts rproc by using the sysfs | 3 | of remoteproc. If a user stops and starts rproc by using the sysfs |
4 | interface, then on pm suspension the firmware loading fails. Keep the | 4 | interface, then on pm suspension the firmware loading fails as the |
5 | device awake in such a case just like it is done for the recovery path. | 5 | request_firmware call under adsp_load returns failure. Add device |
6 | awake calls to fix this. | ||
6 | 7 | ||
7 | Fixes: a781e5aa59110 ("remoteproc: core: Prevent system suspend during remoteproc recovery") | ||
8 | Signed-off-by: Souradeep Chowdhury <quic_schowdhu@quicinc.com> | 8 | Signed-off-by: Souradeep Chowdhury <quic_schowdhu@quicinc.com> |
9 | Cc: stable@vger.kernel.org | ||
10 | --- | 9 | --- |
11 | drivers/remoteproc/remoteproc_core.c | 6 +++++- | 10 | Changes in v4 |
12 | 1 file changed, 5 insertions(+), 1 deletion(-) | 11 | |
12 | *Remove stability from mailing list | ||
13 | *Remove the extra tab in v3 | ||
14 | *Change the commit description | ||
15 | |||
16 | drivers/remoteproc/remoteproc_core.c | 4 ++++ | ||
17 | 1 file changed, 4 insertions(+) | ||
13 | 18 | ||
14 | diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c | 19 | diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c |
15 | index XXXXXXX..XXXXXXX 100644 | 20 | index XXXXXXX..XXXXXXX 100644 |
16 | --- a/drivers/remoteproc/remoteproc_core.c | 21 | --- a/drivers/remoteproc/remoteproc_core.c |
17 | +++ b/drivers/remoteproc/remoteproc_core.c | 22 | +++ b/drivers/remoteproc/remoteproc_core.c |
18 | @@ -XXX,XX +XXX,XX @@ int rproc_boot(struct rproc *rproc) | 23 | @@ -XXX,XX +XXX,XX @@ int rproc_boot(struct rproc *rproc) |
19 | pr_err("invalid rproc handle\n"); | ||
20 | return -EINVAL; | 24 | return -EINVAL; |
21 | } | 25 | } |
22 | - | 26 | |
23 | + | ||
24 | + pm_stay_awake(rproc->dev.parent); | 27 | + pm_stay_awake(rproc->dev.parent); |
25 | dev = &rproc->dev; | 28 | dev = &rproc->dev; |
26 | 29 | ||
27 | ret = mutex_lock_interruptible(&rproc->lock); | 30 | ret = mutex_lock_interruptible(&rproc->lock); |
28 | @@ -XXX,XX +XXX,XX @@ int rproc_boot(struct rproc *rproc) | 31 | @@ -XXX,XX +XXX,XX @@ int rproc_boot(struct rproc *rproc) |
... | ... | diff view generated by jsdifflib |