Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp505119lqo; Wed, 8 May 2024 06:41:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU5BdXsDtw+CIE0k/OwcF5TxfnSr3sg/wxooihYsKjbIS0nVLqmLaShxsdNuZdHjx4culWfqWJNkPX5jt2loliB5lvI6ZIS5gpCmtvxSA== X-Google-Smtp-Source: AGHT+IGS5IV8ir70uJ5waswuAcXpJkFsn0z+eqOdUE9ltOUGI5JqfyOZb6VD/Ys5YO2O1S2Q7hQC X-Received: by 2002:a17:907:11ca:b0:a59:c9ce:338a with SMTP id a640c23a62f3a-a59fb922f26mr164917566b.2.1715175689019; Wed, 08 May 2024 06:41:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715175689; cv=pass; d=google.com; s=arc-20160816; b=tNGicOTzVrky60JCRJ3JH61C/GxlUpJJux052vUeUW0FdD2dHzw8WVpuwPlR5CBp11 XDQKrs6Foe+zpff1nz0mrmZ5HE+41FVtBvNwY+EsS9TdZOJfWyI1PFN1yaRCUSLxWgP8 sGibmJZMDWbl0M4GQxnoCID8mozCf7ifHUocz2HlPY6+WOu5kyw7GpfYXK14DJfruAv0 OJPdMDYYezXgKwjpsbJmg0Bup5yq3DCAnfi4LXGv9bvvCQY0ktH4qWXWNB5WvqpJrjfe LmSTfvqY7bU+7V/dbYoOb5+pz8y8NcOkkpwAJmsSLHmJbKVO1T5BVHf7gapD7hZViZTT pCTw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature:dkim-signature; bh=1anWl7U0g1N5ReOl67RGFJDhNdBee4tIaUiND+Vgla8=; fh=m68b/fW4vecUmttClhd3gz/nuwu3+g+ZsMg2efLudtE=; b=dgzyE9gPRvb23k8iwlh5B4RxL5XtUK95vX4nYcRgsqF4/6qpdOMjyHDDc2HH4kwPUu PNcnI+xqjbH6hvsaAqMHF+/F4pQlyMcKFcezlp8+VYCF/jrQfZMGStjzJ1ehnSUpPP71 +8hNsW6/I3mEvHHzR8oh02tHGCWvSwMVGk217E9LqSWpxH9PpDixmRJdkPeKBUq5tCxo sy82gN0vlHvYZHf26P9bIuZWKEG8oryTwBFc1cB9ezwzH0AjX1b06+Zn7YQuDqPrGkSK vW48pky9efBlJu/oOemMqcNJzsROKa4mgfVb7vI1Q7OlOwLhU0gvXN4OHZtVEGS4jHFS x8aQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tq-group.com header.s=key1 header.b=H2+bo0K7; dkim=temperror (no key for signature) header.i=@ew.tq-group.com header.s=dkim header.b=qtXJCzoe; arc=pass (i=1 spf=pass spfdomain=ew.tq-group.com dkim=pass dkdomain=tq-group.com dmarc=pass fromdomain=ew.tq-group.com); spf=pass (google.com: domain of linux-kernel+bounces-173327-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173327-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=tq-group.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id z27-20020a1709063adb00b00a59766bec38si6480157ejd.213.2024.05.08.06.41.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 06:41:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-173327-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@tq-group.com header.s=key1 header.b=H2+bo0K7; dkim=temperror (no key for signature) header.i=@ew.tq-group.com header.s=dkim header.b=qtXJCzoe; arc=pass (i=1 spf=pass spfdomain=ew.tq-group.com dkim=pass dkdomain=tq-group.com dmarc=pass fromdomain=ew.tq-group.com); spf=pass (google.com: domain of linux-kernel+bounces-173327-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173327-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=tq-group.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id BD2C31F213A0 for ; Wed, 8 May 2024 13:41:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 36FE47D088; Wed, 8 May 2024 13:38:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tq-group.com header.i=@tq-group.com header.b="H2+bo0K7"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=ew.tq-group.com header.i=@ew.tq-group.com header.b="qtXJCzoe" Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0EF747D095; Wed, 8 May 2024 13:38:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=93.104.207.81 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715175503; cv=none; b=ua7HuWqsEK89K5GdchMedgK9sSJ8EKhUar56JLiqsRwnjCIRQnDUlRJ2zmmZT7cu6yHySpsTTCdP7mfd9Ql3HwjybbDPK7ztGtaKK14ChV/SyFZ70bCSjfH4gpp+HUbDPPVBSMmdT3CJWOoJAxrW5xLWi+urYj8/LMD9zEEdoRE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715175503; c=relaxed/simple; bh=vB0Sjt7S+gjdevIA1MOKWP5yvN4Z07ftcH3hTneiHdc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=o4upPQsawuwAKaxHj2vrcjoI/nG3w5RayaJarizD87MrFfytWqLVwaHqQMEyufkXk077jNyzdGjwKo800DGlwlLUrh3ZfFWxixyyXI6kAKfXNumHUNt+ehDJuozCEvNb6BTjwcircfd417BYyPtXEI7qD6c8ETwLPQW++Nd4yZU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ew.tq-group.com; spf=pass smtp.mailfrom=ew.tq-group.com; dkim=pass (2048-bit key) header.d=tq-group.com header.i=@tq-group.com header.b=H2+bo0K7; dkim=fail (0-bit key) header.d=ew.tq-group.com header.i=@ew.tq-group.com header.b=qtXJCzoe reason="key not found in DNS"; arc=none smtp.client-ip=93.104.207.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ew.tq-group.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ew.tq-group.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1715175500; x=1746711500; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=1anWl7U0g1N5ReOl67RGFJDhNdBee4tIaUiND+Vgla8=; b=H2+bo0K7oLCgYvX4fiB/8hxucoN3XJyPIX8zpROAL4MnIvwOE1u3Os0a 980VafRB/96O/j7EQQ8WqKlJUZZNx2/QJBIh02YwoAvYBQdqsszmpTjqq WLaDavkxvLEUdkLlMfqoQzTt4Gkzwh+ofOc0y5qu2DNjnJZa1VY1V+Jow 3rglfLXKQGY6zh3UZh3uzpNqTXPbUBQqzcYmmwbrsKfCBjuk3Mwuna13e FgyeTwZazyZKs4fnC2NXaxnu6sQH8bRJNNfNYERgXajMUAksLHA2ZDN4x 5gfTdoKvjIp/RIhu4yp5y7WuKAZ3QPKGgv7nXkLwYNK3ke2b4JTPcJVSD A==; X-CSE-ConnectionGUID: z54Sk1EmRBC1VdH69ne3fA== X-CSE-MsgGUID: 3vZd3Y/sRkKMGvbzBMbsTQ== X-IronPort-AV: E=Sophos;i="6.08,145,1712613600"; d="scan'208";a="36814849" Received: from vmailcow01.tq-net.de ([10.150.86.48]) by mx1.tq-group.com with ESMTP; 08 May 2024 15:38:11 +0200 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id D977816E68D; Wed, 8 May 2024 15:38:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ew.tq-group.com; s=dkim; t=1715175487; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding; bh=1anWl7U0g1N5ReOl67RGFJDhNdBee4tIaUiND+Vgla8=; b=qtXJCzoersL5wQiIkKQBAwn4D4j1wABKeNyuQudkAIie3Q8ZmvyTdD5EEbJNiX7a42Ctpk W1eBU5pUlT2EFPWCm6CPi5kFsDDgkeP0OUiJjsVJct0eVihbTEg76lQCV7yAo2N+FH5Etn PcWCE0YGvTmH1q9BOR0cBxOGgSPG/o0oLR1glcAgFoOz8b3+btIhMgCk1mhPeIjg7K5tBZ v9qfdIH/33ko0jAiHFk/lPBP03oCDFu2N5ZCDQ391ng8zlYRQZZPbi96RHuKup5SCpW0AO Q3DcCAxCoeIkVPH7W6D6WB+F0LyjF6wjePw6SGW3HHIKKh93QW/RJwxc+AfrRg== From: Matthias Schiffer To: Greg Kroah-Hartman , Jiri Slaby , Shawn Guo , Sascha Hauer Cc: Pengutronix Kernel Team , Fabio Estevam , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux@ew.tq-group.com, Matthias Schiffer , Michael Krummsdorf Subject: [PATCH] serial: imx: Raise TX trigger level to 8 Date: Wed, 8 May 2024 15:37:44 +0200 Message-ID: <20240508133744.35858-1-matthias.schiffer@ew.tq-group.com> X-Mailer: git-send-email 2.43.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Last-TLS-Session-Version: TLSv1.3 At the default TX trigger level of 2 in non-DMA mode (meaning that an interrupt is generated when less than 2 characters are left in the FIFO), we have observed frequent buffer underruns at 115200 Baud on an i.MX8M Nano. This can cause communication issues if the receiving side expects a continuous transfer. Increasing the level to 8 makes the UART trigger an interrupt earlier, giving the kernel enough time to refill the FIFO, at the cost of triggering one interrupt per ~24 instead of ~30 bytes of transmitted data (as the i.MX UART has a 32 byte FIFO). Signed-off-by: Michael Krummsdorf Signed-off-by: Matthias Schiffer --- drivers/tty/serial/imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 79f1503cd75b4..2eb22594960f3 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -1305,7 +1305,7 @@ static void imx_uart_clear_rx_errors(struct imx_port *sport) } -#define TXTL_DEFAULT 2 /* reset default */ +#define TXTL_DEFAULT 8 #define RXTL_DEFAULT 8 /* 8 characters or aging timer */ #define TXTL_DMA 8 /* DMA burst setting */ #define RXTL_DMA 9 /* DMA burst setting */ -- TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany Amtsgericht München, HRB 105018 Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider https://www.tq-group.com/