linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: rawnand: stm32_fmc2: increase DMA completion timeouts
@ 2019-06-21 14:48 Christophe Kerello
  2019-06-27 16:59 ` Miquel Raynal
  0 siblings, 1 reply; 2+ messages in thread
From: Christophe Kerello @ 2019-06-21 14:48 UTC (permalink / raw)
  To: miquel.raynal, richard, dwmw2, computersforpeace, marek.vasut, vigneshr
  Cc: bbrezillon, linux-mtd, linux-kernel, linux-stm32,
	Christophe Kerello, Amelie Delaunay

When the system is overloaded, DMA data transfer completion occurs after
100ms. Increase the timeouts to let it the time to complete.

Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>
Signed-off-by: Christophe Kerello <christophe.kerello@st.com>
---
 drivers/mtd/nand/raw/stm32_fmc2_nand.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
index 4aabea2..c7f7c6f 100644
--- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c
+++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
@@ -981,7 +981,7 @@ static int stm32_fmc2_xfer(struct nand_chip *chip, const u8 *buf,
 
 	/* Wait DMA data transfer completion */
 	if (!wait_for_completion_timeout(&fmc2->dma_data_complete,
-					 msecs_to_jiffies(100))) {
+					 msecs_to_jiffies(500))) {
 		dev_err(fmc2->dev, "data DMA timeout\n");
 		dmaengine_terminate_all(dma_ch);
 		ret = -ETIMEDOUT;
@@ -990,7 +990,7 @@ static int stm32_fmc2_xfer(struct nand_chip *chip, const u8 *buf,
 	/* Wait DMA ECC transfer completion */
 	if (!write_data && !raw) {
 		if (!wait_for_completion_timeout(&fmc2->dma_ecc_complete,
-						 msecs_to_jiffies(100))) {
+						 msecs_to_jiffies(500))) {
 			dev_err(fmc2->dev, "ECC DMA timeout\n");
 			dmaengine_terminate_all(fmc2->dma_ecc_ch);
 			ret = -ETIMEDOUT;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mtd: rawnand: stm32_fmc2: increase DMA completion timeouts
  2019-06-21 14:48 [PATCH] mtd: rawnand: stm32_fmc2: increase DMA completion timeouts Christophe Kerello
@ 2019-06-27 16:59 ` Miquel Raynal
  0 siblings, 0 replies; 2+ messages in thread
From: Miquel Raynal @ 2019-06-27 16:59 UTC (permalink / raw)
  To: Christophe Kerello
  Cc: richard, dwmw2, computersforpeace, marek.vasut, vigneshr,
	bbrezillon, linux-mtd, linux-kernel, linux-stm32,
	Amelie Delaunay

Hi Christophe,

Christophe Kerello <christophe.kerello@st.com> wrote on Fri, 21 Jun
2019 16:48:00 +0200:

> When the system is overloaded, DMA data transfer completion occurs after
> 100ms. Increase the timeouts to let it the time to complete.
> 
> Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>

The first SoB should be the author's. Either Amelie is the author and
you should use 'git commit --amend --author=..." or she is not and
should be dropped (unless she sends the patch which is yours, and in
this case her name should appear second).

> Signed-off-by: Christophe Kerello <christophe.kerello@st.com>
> ---
>  drivers/mtd/nand/raw/stm32_fmc2_nand.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> index 4aabea2..c7f7c6f 100644
> --- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> +++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> @@ -981,7 +981,7 @@ static int stm32_fmc2_xfer(struct nand_chip *chip, const u8 *buf,
>  
>  	/* Wait DMA data transfer completion */
>  	if (!wait_for_completion_timeout(&fmc2->dma_data_complete,
> -					 msecs_to_jiffies(100))) {
> +					 msecs_to_jiffies(500))) {
>  		dev_err(fmc2->dev, "data DMA timeout\n");
>  		dmaengine_terminate_all(dma_ch);
>  		ret = -ETIMEDOUT;
> @@ -990,7 +990,7 @@ static int stm32_fmc2_xfer(struct nand_chip *chip, const u8 *buf,
>  	/* Wait DMA ECC transfer completion */
>  	if (!write_data && !raw) {
>  		if (!wait_for_completion_timeout(&fmc2->dma_ecc_complete,
> -						 msecs_to_jiffies(100))) {
> +						 msecs_to_jiffies(500))) {

IIRC I already asked you this but could you please make a define and at
the same time make it 1000 ms, I don't see the point in being close
to the maximum latency. If this is reached, your transfer was
screwed already, there is no performance impact here.

Sorry for the late notice but I will close the nand/next branch
tomorrow, so I'll queue your v2 only if I receive it soon enough :)

Thanks,
Miquèl

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-06-27 16:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-21 14:48 [PATCH] mtd: rawnand: stm32_fmc2: increase DMA completion timeouts Christophe Kerello
2019-06-27 16:59 ` Miquel Raynal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).