Message ID | 20230201142700.4346-4-sorganov@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 12E39C636CD for <linux-arm-kernel@archiver.kernel.org>; Wed, 1 Feb 2023 14:40:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6n+JkoIm03E/VgnR7OzzAvYNJ4ha+oGj9BoqY+nT3ds=; b=kXg9KekTQZvXky 0YzKYsIAkqqGwTn8avSHxxvPU5KIac/OTyjD9NVGa25vuDVNZ8XDiaDR4BBjeykNcl9A63ohrgD+/ kYbh0tmUUV0p/H5tjxMCl6bF+cPigbVW72NxCncZEzQLy0BRf3FA78xEXGMojQflXzQxRxnVfX8vh d7aBQZUe8be/ZVNxnH3w9XYwddvmf4WhKeMqryyGv0D294djPCE+aJy4lD/qyD8kGiEWb8zwNabRq 07S0Et2BxeqbB/PkepwgE5ctyz2vqw90FnKK2CCoTVY2pRVivJYKuznvAAT7j0JJpa89TB82M3JXD s3fy3/r4rQESxYPTZzIQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNEGM-00CQgO-Le; Wed, 01 Feb 2023 14:39:04 +0000 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNE5P-00CLn5-Uc for linux-arm-kernel@lists.infradead.org; Wed, 01 Feb 2023 14:27:45 +0000 Received: by mail-ed1-x52f.google.com with SMTP id x7so14626885edr.0 for <linux-arm-kernel@lists.infradead.org>; Wed, 01 Feb 2023 06:27:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=t9PFvNqNRiBtgoK1FQlt2dgZjVa65hIZ+MQtdwTOsMQ=; b=VuJERbKWYOkgt/D8s8FOfDHVNd9glpziOVsTG+1JjLTYT7jGJy1VkNDZTgK1e3AjMi uiTHC7h8eh40cm5Ey0iOSL2dpFDm/v98ZQMIex6y23PczBzbg88bVdaUZNd0WWg/0jOA JzycDx1+F+NmAh/FdYq0uN6t5s2s+R5IAZ0CchzXlf2wZRO593HSjQ8BJOyjxZ9HWs/i uQzPZWRRcgdGxyi/Z+02V/ktq/h+yh9NWIrVbclaJyzIOW5XSGww95ZnYMue7FOCrd9+ TUr+d6HsTGLjHygi10C1POXJ+GgaTvnL56wA9d+DVUKNX4J2/dVnsWp5U/y7xmxOeUQY vjTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=t9PFvNqNRiBtgoK1FQlt2dgZjVa65hIZ+MQtdwTOsMQ=; b=m2+k40M5/FNsyg+Lwumh+wLyD+GR3aAyL4tjzyUigwguV1iyHDAbhmThJ10GGfb005 5apWEWMjqnJQIHLcO2G373DMp1bCuCdnCbjM5tgZEQOSLmp/vaVH5BjNm4AmJ6kpzITd 8JWKVuJjoKnFSWt4fz7Ov7xZLpvPVQMtUikO+WSPbH7G2m5vGJ0Auag+dy8kqkEwPxRL /Xy97JQNZMUApMTJLuan4qVOwnHUdmdIYhrqEUHNQhJg/mN3qS+8XN3ThRarCLwBH2y8 l+sjqIsxuvsZBnfNwQAZxZQXH9D1QMp/S5z/lSF72FhBcAk4Cox2QJ96qA9ObfFGYU33 igNg== X-Gm-Message-State: AO0yUKX4eT2BTskSjCDfev1NFu7ukpSptgGYML4mQFgZECWN+OUmJ4GD 33av0dU+xxcImdTKk+OD4vo= X-Google-Smtp-Source: AK7set9hYDxvOQi0xjHhLN/X3aYvdrUsus0F/Am0ploCUlkQQm6XutLDb+3FJsBgq+1sa7AWYzsHnw== X-Received: by 2002:a50:ccd3:0:b0:47a:e008:8662 with SMTP id b19-20020a50ccd3000000b0047ae0088662mr2526553edj.34.1675261662685; Wed, 01 Feb 2023 06:27:42 -0800 (PST) Received: from osv.localdomain ([89.175.180.246]) by smtp.gmail.com with ESMTPSA id cf8-20020a0564020b8800b004a18f2ffb86sm8975564edb.79.2023.02.01.06.27.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Feb 2023 06:27:42 -0800 (PST) From: Sergey Organov <sorganov@gmail.com> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-serial@vger.kernel.org, Fabio Estevam <festevam@gmail.com>, Jiri Slaby <jirislaby@kernel.org>, Richard Genoud <richard.genoud@gmail.com>, Sascha Hauer <s.hauer@pengutronix.de>, Shawn Guo <shawnguo@kernel.org>, Tim Harvey <tharvey@gateworks.com>, =?utf-8?q?Tomasz_Mo=C5=84?= <tomasz.mon@camlingroup.com>, =?utf-8?q?Uwe_Kle?= =?utf-8?q?ine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>, Johan Hovold <johan@kernel.org>, =?utf-8?q?Ilpo_J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com>, Sherry Sun <sherry.sun@nxp.com>, Stefan Wahren <stefan.wahren@i2se.com>, linux-arm-kernel@lists.infradead.org, NXP Linux Team <linux-imx@nxp.com>, Pengutronix Kernel Team <kernel@pengutronix.de>, Sergey Organov <sorganov@gmail.com> Subject: [PATCH v1 3/7] serial: imx: do not sysrq broken chars Date: Wed, 1 Feb 2023 17:26:56 +0300 Message-Id: <20230201142700.4346-4-sorganov@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230201142700.4346-1-sorganov@gmail.com> References: <87bko4e65y.fsf@osv.gnss.ru> <20230201142700.4346-1-sorganov@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230201_062744_080212_BA52E2E0 X-CRM114-Status: GOOD ( 12.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
[v1,1/7] serial: imx: factor-out common code to imx_uart_soft_reset()
|
expand
|
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index e7fce31e460d..e709118fe85c 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -911,9 +911,6 @@ static irqreturn_t __imx_uart_rxint(int irq, void *dev_id) continue; } - if (uart_handle_sysrq_char(&sport->port, (unsigned char)rx)) - continue; - if (unlikely(rx & URXD_ERR)) { if (rx & URXD_BRK) sport->port.icount.brk++; @@ -942,6 +939,8 @@ static irqreturn_t __imx_uart_rxint(int irq, void *dev_id) flg = TTY_OVERRUN; sport->port.sysrq = 0; + } else if (uart_handle_sysrq_char(&sport->port, (unsigned char)rx)) { + continue; } if (sport->port.ignore_status_mask & URXD_DUMMY_READ)
Do not call uart_handle_sysrq_char() if we got any receive error along with the character, as we don't want random junk to be considered a sysrq. Signed-off-by: Sergey Organov <sorganov@gmail.com> --- drivers/tty/serial/imx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)