From patchwork Mon Nov 13 16:07:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ronald Monthero X-Patchwork-Id: 164560 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp1306903vqg; Mon, 13 Nov 2023 08:09:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IEKXB/nh4Be6umTzTkiBu/99LuXbrxWd9LGHzULqRo6py9sdDOYhGKNswKLq9EvSNp9NVHV X-Received: by 2002:a17:90b:4c04:b0:27d:76e2:ab18 with SMTP id na4-20020a17090b4c0400b0027d76e2ab18mr5135444pjb.9.1699891746459; Mon, 13 Nov 2023 08:09:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699891746; cv=none; d=google.com; s=arc-20160816; b=wAX+2W+/HZ7h2BdtEu8mngTNtsYRbQExD5QNepplYNyCbbIfJGnFALyjQc4E6bsUgL LJJH69NvLsd/sJl9sexqsZK2kQhCOdkOQQT4wETx6d2dmihEUy8V9Brm4CEp0wb9l/UO qOtv6jky1CD+1QDF82KapLLqMhzURGYurCZ3ZgsXGI/qQ4yKVMzeA+Ozvau7TmImT+J+ vRTQCUB4X8Bgl9flapY0I6qApgom6piRZBfIK/Q5pN24REEkwvFs84ciEBn2rdp44NN+ BjUydZMu5e2g2bpti1NczA3z5YPcPFafVhLoZ5uDF8GCZDgz6Hl+0um1oVMhm6DW1O8w DeTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=HPuU6NHbUp/SgydRBNeLDEaf5ofrHVDlSX75GYurXdQ=; fh=2JRqlYcVHxGFn7RG2aHV8MU+Bgj8MQy/3Vfk2SaPJkQ=; b=pqOu1PXUIOHjEqneq/Fh3qGeCsHwCD+DTIuXlpqPer4ZDHrUjcbw68eU1VpNgU22Zb GdgR/LnWKQS180aG4EV/vamRslxs6MHSq82NJyIDpABeGoycmiU6cItyK/jg9gScwFm3 GxuTlgv/ebG3qCTiZwlrKIeV3FSZD5ZN52KtSD1Yg0Yjdb1kFFjROxXHk8BztrzD/BzF KmGrhKUzDPdHLTN51coKuR9KTfmf06L45Hd2ipRfQ/xcNz73ILbeykM1JdG48cDmKkBE CdvnJQfXwGDPMlqtLRqzRJm/qsClvdHml73mgL4Rsiqa4qgGbykiwnEQhCLiSXHQjnUP 84bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20230601 header.b=k4nTc58I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id w3-20020a17090a8a0300b002802838d557si10584790pjn.55.2023.11.13.08.09.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Nov 2023 08:09:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20230601 header.b=k4nTc58I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 3DABD802A839; Mon, 13 Nov 2023 08:09:04 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229742AbjKMQI6 (ORCPT + 29 others); Mon, 13 Nov 2023 11:08:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231458AbjKMQI4 (ORCPT ); Mon, 13 Nov 2023 11:08:56 -0500 Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 525D0171A; Mon, 13 Nov 2023 08:08:53 -0800 (PST) Received: by mail-pg1-x529.google.com with SMTP id 41be03b00d2f7-5bd5809f63aso2689371a12.3; Mon, 13 Nov 2023 08:08:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699891732; x=1700496532; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HPuU6NHbUp/SgydRBNeLDEaf5ofrHVDlSX75GYurXdQ=; b=k4nTc58IHG7SWOnVaPKW/nFT16HjOtd+Mr9ro2+FhEEoJmJTmqEBwMD2soB+TOQG36 qoHolMoMnT/3+PJIniFWA3F1/ZtNS68d6zNjYVrudV2k3kUIaaB1A+TdhOK/AS1/B/mk w8SbJJseWTCtlYGfYxyF5dJUB3qDl4ORbxvImgRIqcQrPW1aHJBKJyyDOkqqIsLlsNNm kczGJXxC1I9CV+0po4z4MBs/Ji4sfuc0bWW7hPGNQ73S2HwFVnjG9nsYTHsEIr/vy+1s AGxnMcmiAW239HkKO0dNOI+6y/Cktfj3qhXFKeoqU9jzGv/d+Qw6mJDE7sEmFUYBiPmJ jGsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699891732; x=1700496532; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HPuU6NHbUp/SgydRBNeLDEaf5ofrHVDlSX75GYurXdQ=; b=hcqk22cxAGCMdH/Mk00BEJUIm+jdnqHnKtBfVJiZoroHGr6Z7gtiCPTiUtnPMuknYw Ykcors0KuOrz/mb9tH0YfIE1DWChq9Wg1N9aPixqDLnwn3kxqBpWnAB10wGcIcjjfFEP 8crV1809NKCuoJXa1SRQTJyv1kA60+kceFTKoomn4JiA3pPdE0vTAtTI+5tNRdtMU8Xo +GrITLLsWIeERk8/MDn5AWK5Zp168YP8hPmng0y8RMQQPBSlQHTJDMNYqj8v7RtCyo7a CKPWCwJKSjp+Fa0bPvQvNC79hfl2uiR9yb0Bruhf5/J10eEx7dCJDyZ+Ud+z+SbEHoCw XJww== X-Gm-Message-State: AOJu0Yw5CT1F0bXI4SgZJpfwGLjLjXGEal0q/Z813bCp1IJwMweb+U1w BmuSczEAOpglOX/FkwhWFEA= X-Received: by 2002:a17:90b:11c1:b0:280:14ac:a6dc with SMTP id gv1-20020a17090b11c100b0028014aca6dcmr4522639pjb.25.1699891731757; Mon, 13 Nov 2023 08:08:51 -0800 (PST) Received: from localhost.localdomain ([149.167.148.33]) by smtp.gmail.com with ESMTPSA id p17-20020a17090adf9100b00281032f9f9csm5778832pjv.35.2023.11.13.08.08.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Nov 2023 08:08:51 -0800 (PST) From: Ronald Monthero Cc: richard@nod.at, vigneshr@ti.com, heiko@sntech.de, martin.blumenstingl@googlemail.com, paul@crapouillou.net, robh@kernel.org, u.kleine-koenig@pengutronix.de, debug.penguin32@gmail.com, AVKrasnov@sberdevices.ru, r.czerwinski@pengutronix.de, andriy.shevchenko@linux.intel.com, jaimeliao.tw@gmail.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Miquel Raynal , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Nicolas Ferre Subject: [PATCH v2] mtd: rawnand: Increment IFC_TIMEOUT_MSECS for nand controller response Date: Tue, 14 Nov 2023 02:07:49 +1000 Message-Id: <20231113160751.620810-1-debug.penguin32@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231113131634.614467-1-debug.penguin32@gmail.com> References: <20231113131634.614467-1-debug.penguin32@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 13 Nov 2023 08:09:04 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782464783835693775 X-GMAIL-MSGID: 1782465688056848562 Under heavy load it is likely that the controller is done with its own task but the thread unlocking the wait is not scheduled in time. Increasing IFC_TIMEOUT_MSECS allows the controller to respond within allowable timeslice of 1 sec fsl,ifc-nand 7e800000.nand: Controller is not responding main/smp_fsm.c:1884 ] (__schedule) from [<8064bb01>] (schedule+0x8d/0xc2) [<8064bb01>] (schedule) from [<8064dacd>] [<8064dacd>] (rt_mutex_slowlock_block.constprop.0) from [<8064db57>] [<8064db57>] (__rt_mutex_slowlock.constprop.0) from [<8064dbf7>] [<8064dbf7>] (rt_mutex_slowlock.constprop.0) from [<804b2047>] [<804b2047>] (nand_get_device) from [<804b5335>] (nand_write_oob+0x1b/0x4a) [<804b5335>] (nand_write_oob) from [<804a3585>] (mtd_write+0x41/0x5c) [<804a3585>] (mtd_write) from [<804c1d47>] (ubi_io_write+0x17f/0x22c) [<804c1d47>] (ubi_io_write) from [<804c047b>] (ubi_eba_write_leb+0x5b/0x1d0) Cc: stable@vger.kernel.org Signed-off-by: Ronald Monthero --- drivers/mtd/nand/raw/fsl_ifc_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/nand/raw/fsl_ifc_nand.c b/drivers/mtd/nand/raw/fsl_ifc_nand.c index 20bb1e0cb5eb..42f8ea46b6a8 100644 --- a/drivers/mtd/nand/raw/fsl_ifc_nand.c +++ b/drivers/mtd/nand/raw/fsl_ifc_nand.c @@ -21,7 +21,7 @@ #define ERR_BYTE 0xFF /* Value returned for read bytes when read failed */ -#define IFC_TIMEOUT_MSECS 500 /* Maximum number of mSecs to wait +#define IFC_TIMEOUT_MSECS 1000 /* Maximum number of mSecs to wait for IFC NAND Machine */ struct fsl_ifc_ctrl;