Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1144306pxv; Fri, 9 Jul 2021 19:24:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxc6zOtPPRbXXqeM/GUTxLPSRI7nHTz6gM/kUzmXbXLM6XALSeWGI2xRIINYAe7r22mfpOn X-Received: by 2002:a50:8d8b:: with SMTP id r11mr2998091edh.217.1625883892262; Fri, 09 Jul 2021 19:24:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625883892; cv=none; d=google.com; s=arc-20160816; b=0b4z3OOHQH//MxvDxBK2es0IgJ0KeAl1r9pNqk9gSmthlMXwHhBjfhUI5lsPv+lsdg cTmbyrV694665darx5l1nCE0A18GJfQ5DsgYUazbSJjAagjTrw9vV7Op7PfZ2Z5T7ZKg mj/fSGp5RDWPr9ZiINNpOrZZjK0QUmVrpcsNbqJ9GLnsby7wVKY3kZwUXfGAv0GxW8dJ qAVSz+pCe4b8Rg8V0G9hCSx6XJXcJhpKuJnZCOjsNBk3swm6HtzPNwqcS8Sr13zS5gD4 uKuxdbSD6JvNh7rvTgF7ysQsxZgKMCnbH2Y8u/J92sYnl7rsdSpxu+jRN8s93qD113Uj GU9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4Qg+KgOaKODl2ur5oB9kE0PU14DbCn62l1y0TMHddMU=; b=fzjdGMO+6M2f+UIPIoc6pI9HdeePkMLNhopfv4vbTISWhc1G4BtDqfXaswnfYmR9wx ftz23FsCK6U/F1fVgHrLEhwQ9WpyrhbrtnVtuioJNG/WnMjY+ThUjOE50S2IFACj1Vsj AMEcvsnNLG7BMEmN4wC/RUMS38fECcDffJgcg/GfuepTnLeVh5czbCmMH/6usPNMX6tw CktPKwY+zPG/0SYEtbP9DW8smep7BeC471Tdm5+vIPKL4oooVbl3izLxSsVSXTYy4UUY t1jab/sGNeJpJ/N0Jh5TGysoZWwqazM7WSOQWPem47GXNTv82Ie7qeUnUInmHnbJSbkf jndg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=D3cLdmKG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w3si9184003ejf.235.2021.07.09.19.24.28; Fri, 09 Jul 2021 19:24:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=D3cLdmKG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231905AbhGJCY6 (ORCPT + 99 others); Fri, 9 Jul 2021 22:24:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:41726 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232201AbhGJCYy (ORCPT ); Fri, 9 Jul 2021 22:24:54 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 94046613D6; Sat, 10 Jul 2021 02:22:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625883730; bh=uf4uxRfWf+fOrqED+mTED+zd1U67SWMQN2V6GE5YXfo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D3cLdmKG7NFMBEwgLfyj0cqkQh7Y9JOeb6NthJfcBfC8bEB+IfVngIPUqZwIma7il GK1ohgxX4Ka07OlX4VFyS5+gypFAVbIEzVbuW5erVfKKuA3V0UKyuiVc/aCFyJNhvi fNSUDYd18quI/1qgL6512xLg+7M9X9Jdxcy17CzBvgwQzuiR1sFAyMA6JZcsWoL+Sx iskJhPEYKLXFx3OS0TzHpIqPK7fygyUrBLR341qs14WIuk1/Rm3x24aibAzVMxgn1O E/81Nc71yzkX9LrivO0JQjktDgJfZeZ/yj5JzM4XwMasetbiPCMgL0GZo5pTXavQpC RYvbY9fcOYkPQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Michael Walle , Greg Kroah-Hartman , Sasha Levin , linux-serial@vger.kernel.org Subject: [PATCH AUTOSEL 5.12 010/104] serial: fsl_lpuart: disable DMA for console and fix sysrq Date: Fri, 9 Jul 2021 22:20:22 -0400 Message-Id: <20210710022156.3168825-10-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210710022156.3168825-1-sashal@kernel.org> References: <20210710022156.3168825-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Michael Walle [ Upstream commit 8cac2f6eb8548245e6f8fb893fc7f2a714952654 ] SYSRQ doesn't work with DMA. This is because there is no error indication whether a symbol had a framing error or not. Actually, this is not completely correct, there is a bit in the data register which is set in this case, but we'd have to read change the DMA access to 16 bit and we'd need to post process the data, thus make the DMA pointless in the first place. Signed-off-by: Michael Walle Link: https://lore.kernel.org/r/20210512141255.18277-10-michael@walle.cc Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/tty/serial/fsl_lpuart.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index 777d54b593f8..109131b84945 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -1581,6 +1581,9 @@ static void lpuart_tx_dma_startup(struct lpuart_port *sport) u32 uartbaud; int ret; + if (uart_console(&sport->port)) + goto err; + if (!sport->dma_tx_chan) goto err; @@ -1610,6 +1613,9 @@ static void lpuart_rx_dma_startup(struct lpuart_port *sport) int ret; unsigned char cr3; + if (uart_console(&sport->port)) + goto err; + if (!sport->dma_rx_chan) goto err; -- 2.30.2