Message ID | 3dcb002d0ad03dde9a91e8128dbaa320b8a264a9.1349778821.git.vipin.kumar@st.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, Oct 9, 2012 at 12:44 PM, Vipin Kumar <vipin.kumar@st.com> wrote: > Interruptible wait caused trouble in fsmc hardware state machine if the > application was killed abruptly. To make fsmc operation safe turn wait in to > un-interruptible. > > Signed-off-by: Vipin Kumar <vipin.kumar@st.com> Yes this is wise. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Yours, Linus Walleij
On Tue, 2012-10-09 at 16:14 +0530, Vipin Kumar wrote: > Interruptible wait caused trouble in fsmc hardware state machine if the > application was killed abruptly. To make fsmc operation safe turn wait in to > un-interruptible. > > Signed-off-by: Vipin Kumar <vipin.kumar@st.com> Pushed this one to l2-mtd.git, thanks!
diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c index eaffd3b..4b29a64 100644 --- a/drivers/mtd/nand/fsmc_nand.c +++ b/drivers/mtd/nand/fsmc_nand.c @@ -607,7 +607,7 @@ static int dma_xfer(struct fsmc_nand_data *host, void *buffer, int len, dma_async_issue_pending(chan); ret = - wait_for_completion_interruptible_timeout(&host->dma_access_complete, + wait_for_completion_timeout(&host->dma_access_complete, msecs_to_jiffies(3000)); if (ret <= 0) { chan->device->device_control(chan, DMA_TERMINATE_ALL, 0);
Interruptible wait caused trouble in fsmc hardware state machine if the application was killed abruptly. To make fsmc operation safe turn wait in to un-interruptible. Signed-off-by: Vipin Kumar <vipin.kumar@st.com> --- drivers/mtd/nand/fsmc_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)