Re: Remoteproc adaptations for ST-Ericsson modems

From: Ohad Ben-Cohen
Date: Mon May 21 2012 - 07:38:45 EST


On Thu, May 17, 2012 at 6:44 PM, Ohad Ben-Cohen <ohad@xxxxxxxxxx> wrote:
> It sounds like we may have a race there

Can you please check if the below helps ? this will also protects
against premature invocation of rproc_get_by_name().

diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remotepro
index 40e2b2d..3d93d9c 100644
--- a/drivers/remoteproc/remoteproc_core.c
+++ b/drivers/remoteproc/remoteproc_core.c
@@ -1139,6 +1139,9 @@ int rproc_boot(struct rproc *rproc)
return -EINVAL;
}

+ /* if asynchronoush fw loading is underway, wait */
+ wait_for_completion(&rproc->firmware_loading_complete);
+
dev = rproc->dev;

ret = mutex_lock_interruptible(&rproc->lock);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/