Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp764359ybi; Fri, 21 Jun 2019 07:48:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqxz2LTgHs2eS72QoepzHIjIuX/PKN9y6XWJV1ZFQCaH6n3S/AP6DIaDULQKVxvwa4rWFQKa X-Received: by 2002:a17:902:4623:: with SMTP id o32mr14259015pld.112.1561128535296; Fri, 21 Jun 2019 07:48:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561128535; cv=none; d=google.com; s=arc-20160816; b=BvGNEBsma2oPmnwDsxZmaw3E6FsFKtBaFwpfZ02xR4jtrx8n1CzTxHwxOj8BS5qmRH ntFtCFhobVv+IjrHW+edCz7/zqYF03XlgyuyROTLuE6v8st6b2PAQ3Qar58vrgF4hMhn Tag/0RoG68kaAxkjvyED7B5kT8go9l+nz+M0BY7Es0Y+HLCBxvfVx9UX5181B/m8cOVI KAPt5b+IUWw/Q6h73xy786uZ4AeI0P62o6ifkMtzQYDWGlYs7nGrkIhJ7AuhvygzqDCF suAYQzW09t6BK/TD+9ioxNv4Glw2qRlRpgL2dQy03LGpAMhd8gsO+VROcw34YgoNE+n+ YaGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=Cwjx+P0CLYAdoYvZhhXI5cxvFwVJTxiGieG4J4UmpYM=; b=ZCakz00ubx7ZI4hRn2s94G18upDlWh/KVkszGnROT5OmQQTpaXbHKLui8RVd+bfBn1 FX+0SpK2KxGuy9jXsCDnnDSCBEEB8lnAbIZiMFJvmVcaMPTGBY8g0zqWeGkkm+3BpIX9 1skSeFs2Z9xSsZBvfI1lz+zwxwj3VRcclwaVfK4iSCI49ZYzCYoJK7Q7oyLBoglk6RXG Ps7xqNzCSKgKu3I5+XGn9UtxE0SnZ2hmW0gRq61tJG4wFmR3tgbhCfvsnfFnMXfzA88b IOhL40nTM/SeZuvDl1ExNudi4mKDNCa4mwMYMzryDB0/Aiq19SlpsMr8cF7OTF7Yr5wG VT/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=D4yrvom4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f12si2814914pfn.98.2019.06.21.07.48.40; Fri, 21 Jun 2019 07:48:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=D4yrvom4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726121AbfFUOsa (ORCPT + 99 others); Fri, 21 Jun 2019 10:48:30 -0400 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:53632 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725985AbfFUOsa (ORCPT ); Fri, 21 Jun 2019 10:48:30 -0400 Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5LEaLlN015682; Fri, 21 Jun 2019 16:48:14 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=STMicroelectronics; bh=Cwjx+P0CLYAdoYvZhhXI5cxvFwVJTxiGieG4J4UmpYM=; b=D4yrvom4rj/3v+ROxpc8HD5FCEK1xn5s7k5AoHJvDpDfMzChQN1t2oYo+ijPW8wjWZtt cwrU3ENjtAV5ilpUTGdqG4o81CI4Kdza1PBvtfvNPqH1SNayDubffSVMG5/t3nJHRsyW vyDeauZqheg6mkEblmNSJ+9FQkmDumOB1BZnE3f/AqyZC6V7jbmQ3o+H8Pd2G0K0w/FI FwaCcTjpzJn+ylT4ITt9eu3aQ0x//9suO9SxoGwdZpGOiII+oSCT64KCRamutk8IbYVl e2K4PPeYBUmjM45XJSTeI2DIJT7ZOQeI/e8HLqyI2qBEKVqW7FD7ffbrMbKHb7Jcltms CQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2t7813qtbw-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 21 Jun 2019 16:48:14 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 7807D31; Fri, 21 Jun 2019 14:48:13 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag6node2.st.com [10.75.127.17]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 4A4E92BC9; Fri, 21 Jun 2019 14:48:13 +0000 (GMT) Received: from localhost (10.75.127.51) by SFHDAG6NODE2.st.com (10.75.127.17) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Fri, 21 Jun 2019 16:48:12 +0200 From: Christophe Kerello To: , , , , , CC: , , , , Christophe Kerello , Amelie Delaunay Subject: [PATCH] mtd: rawnand: stm32_fmc2: increase DMA completion timeouts Date: Fri, 21 Jun 2019 16:48:00 +0200 Message-ID: <1561128480-14531-1-git-send-email-christophe.kerello@st.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.75.127.51] X-ClientProxiedBy: SFHDAG8NODE3.st.com (10.75.127.24) To SFHDAG6NODE2.st.com (10.75.127.17) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-06-21_10:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Christophe Kerello --- 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