Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1157322iob; Wed, 4 May 2022 16:10:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhw7C5L0g1fD2jfEuYwrBE1cxsIymcMKEy7hCSuk+dYKwm0ZYQuMIY3OELTKUwPTOGRM4z X-Received: by 2002:a17:906:5cb:b0:6cf:954:d84d with SMTP id t11-20020a17090605cb00b006cf0954d84dmr23228484ejt.560.1651705821166; Wed, 04 May 2022 16:10:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651705821; cv=none; d=google.com; s=arc-20160816; b=C22++WLq5wDVqdA0x9VKl4UdqkTq3OXvF8RyJ7JQ2zR3HS4XCkFgkxMzWpkFhes+BH PWNyoPUxUBUaDCYq/hmCXodToYtmvmLuBzPynnCmw0TYEjaXGJYeILWXz8aDu9vwk68W G3YqVvQ67q17CxXafKsHR6KEs+JwJoLvaFxBoor3YpqyfXfPGByV9zSTat6wLjhCyoTe ENMwmv4S1HLAsEWbzrnLd9xEaSZcmPB0zWMNuixr0sPYLDN9McGAC2HGXHz7QrRa44lA LSYsvxWOG8GZj8CE2HmM0+p8ap37vuAZFj9oegaHvZkk4qApQDtSYu+owbkcktahfQw6 6Gkw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=WbWtsu59IEmnxVGwUux92TBGlD7QAOGuNnRbEHLo+WU=; b=KIwbeiQJA+/BZIDKkg3+LWAObpcNtPEG+Js+4syH8LGKNzcxnX6F5Y7cuiK6zUMP/q r2evQV/LRSGUhVoTHvOXVYfS2g/rObWOBSSi0bHkF42AuN6TXl5rDUyNd1RBPszGm0GD Flivlmycc74YzZvb1M0tJ7PtOh7/6sGx1D31VZgHR8AHcnQ2GWsMS0HflJBBNHkyglgg hlPkSRFEb2QaSx8nsaAkwsu2Ozy6kfotK1Ozc80bXESUQOFrODFFsSmDUiDGuCgw5V7F tuHwgdnCskSDgB15Wd+uqg8OYuBuMN+o+qjbzZj3iiMm4VclIPgLHxY5hCaPy8KDDAkR YGJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Rv82N9c4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f11-20020a170906138b00b006e89a7f6fd8si316157ejc.201.2022.05.04.16.09.58; Wed, 04 May 2022 16:10:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Rv82N9c4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357777AbiEDRPP (ORCPT + 99 others); Wed, 4 May 2022 13:15:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355357AbiEDRER (ORCPT ); Wed, 4 May 2022 13:04:17 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81D804ECD5; Wed, 4 May 2022 09:52:59 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 20C54B827A9; Wed, 4 May 2022 16:52:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BCA9CC385A5; Wed, 4 May 2022 16:52:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1651683177; bh=touYmIpRMlAmSx5iLm7raW6VOjHJA2RLrzYNwqDKRrE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Rv82N9c4DoPGizo8YBukuPMjTd7iYg9Q3H/gyjNh+zksS6OQ3k5pPvF1QmjyZiwRO QckHKsW8/J+IOKkOH0+0QV9i1MjI3wbC8Gh+RVT3l/+LwC4BOcppBz1mftmF8GWHCB Wnrq+ESkxy9BmYS522VgWBoaE38OEN22CjomYZxY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Johan Hovold Subject: [PATCH 5.15 029/177] serial: imx: fix overrun interrupts in DMA mode Date: Wed, 4 May 2022 18:43:42 +0200 Message-Id: <20220504153055.653170499@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220504153053.873100034@linuxfoundation.org> References: <20220504153053.873100034@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Johan Hovold commit 3ee82c6e41f3d2212647ce0bc5a05a0f69097824 upstream. Commit 76821e222c18 ("serial: imx: ensure that RX irqs are off if RX is off") accidentally enabled overrun interrupts unconditionally when deferring DMA enable until after the receiver has been enabled during startup. Fix this by using the DMA-initialised instead of DMA-enabled flag to determine whether overrun interrupts should be enabled. Note that overrun interrupts are already accounted for in imx_uart_clear_rx_errors() when using DMA since commit 41d98b5da92f ("serial: imx-serial - update RX error counters when DMA is used"). Fixes: 76821e222c18 ("serial: imx: ensure that RX irqs are off if RX is off") Cc: stable@vger.kernel.org # 4.17 Cc: Uwe Kleine-König Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20220411081957.7846-1-johan@kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -1438,7 +1438,7 @@ static int imx_uart_startup(struct uart_ imx_uart_writel(sport, ucr1, UCR1); ucr4 = imx_uart_readl(sport, UCR4) & ~(UCR4_OREN | UCR4_INVR); - if (!sport->dma_is_enabled) + if (!dma_is_inited) ucr4 |= UCR4_OREN; if (sport->inverted_rx) ucr4 |= UCR4_INVR;