Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1145836pxv; Fri, 9 Jul 2021 19:28:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1h01SPB4NJxr5kAwPqRVID+Bnxhr4P9GOWqP7nlgKGvk29umDgyqwl73hpFzdmQapBodb X-Received: by 2002:a17:907:3d86:: with SMTP id he6mr41342554ejc.440.1625884105583; Fri, 09 Jul 2021 19:28:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625884105; cv=none; d=google.com; s=arc-20160816; b=LV3qCbDcahvabawgPrp8IflCrfLaVSq0Ljj7ixr3EBeNNSannClDfLB4Efp7Wl8xo0 JkUjFZM5RpwmvK6awuUcXTw7cII1AtN7AadWFRp544cLopHtpvWrvjcTVrEoFXIY7ozK wB2sG0Txa0bddNbVzlutw1XF6OQCc8N4jJ9zIoBlKZtovso4zaHHMLV0ZWKlXPwOZZU0 z5aBkzhJWyEuVSl6+b7EjJQWv0f8P85j9muBvArhDigd4cDueUQUGqJZy1kfa7ChkRsL w6OdRU2OZnlgTkSojP1+fUGV6VbwAJMs/eYkowtBOHdJ8MPNp5AKqykNlLhqTwIVYZhz ERMg== 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=z6NAXVzgZLpRJuZrjKD//qeEYuG+O9giC3h01Vpuktk=; b=f3ADPXp6924k9xavRp5IWzuh7z+q+nq4JB9eZGNTHWubMkVqHiDrLshTX1v9Xtxwiz w6duobJNKLlRJ3zX955l0eeoJqJ9YTDkje0iH2dUwkAqPZOSIsWvXerOE+yHfgyQqBqt t8omrAjfrlIHssKUBdkit2te+y1y0ie+SBz9SJFxpkT+BwnfN3+0liiluXfP1QcWHzAc rSIWEVOJlilyfWQgCVXgVfdikQ3ijPMCHFgocfvrQoni/TDTti0D5iCLCWyKzYpk1e7w pEOxSDGNZqKGcgGjlcNKWYm9+3D5UBLR6r2qtxZjU66dq8I9Xc5+w5YwWkVdordnJZ79 NrNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rjnQiVWj; 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 l26si9577648edq.393.2021.07.09.19.28.02; Fri, 09 Jul 2021 19:28:25 -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=rjnQiVWj; 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 S234929AbhGJC3y (ORCPT + 99 others); Fri, 9 Jul 2021 22:29:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:42542 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233534AbhGJC1h (ORCPT ); Fri, 9 Jul 2021 22:27:37 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3B5AB613E8; Sat, 10 Jul 2021 02:24:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625883880; bh=Wqxmro3W+5ccL+hctX7Erm55wgwe6w9dc9oi77S6ap4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rjnQiVWj8yGm5OiaEbHz7BUrWUO9V1IeJdrTQC5QiLSOJar6qxb81JMb4U3i8z0hA 83jts0Gje+NdLs561TPYj5xaPd0ZxFNliOe0PNSsppPUpT/Q8Q+xkRl02uJror+0NY KAnYrC//A32OlHrpYJ85h8/KWihnQtmngPfPBXtTvfx5/op0s9nDbSmXXRw9EwpYrp wzvRtHCnM6QwHFuotzHlCf6gVqbhq0tzX0tJGn/9Z8YZliDvGk4eoDm2rMKHsJiCe9 V4Q0goP5SZXaFgisIfbc1PudK7C19GlD1qQUpEVQg9J7V7jy7WUyWZ5csKNieNdk9K ZhUKWvZV9WK0g== 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.10 09/93] serial: fsl_lpuart: disable DMA for console and fix sysrq Date: Fri, 9 Jul 2021 22:23:03 -0400 Message-Id: <20210710022428.3169839-9-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210710022428.3169839-1-sashal@kernel.org> References: <20210710022428.3169839-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 7aab87c92192..996e9aaa243e 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