Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4606949iob; Sun, 8 May 2022 19:01:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwfniWkhvQtKT8oDC0xva7xnxrdc3j5GhqSQnnkrWD8BRh/wf5vU/3rnXjDtb5RovK7tTSn X-Received: by 2002:a17:903:41c9:b0:15e:ae15:294f with SMTP id u9-20020a17090341c900b0015eae15294fmr13983019ple.44.1652061705154; Sun, 08 May 2022 19:01:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652061705; cv=none; d=google.com; s=arc-20160816; b=HjZWH9T2bod6CA2docICO7ywllgHIa+qcaXpamez8KPrqp7GrCmYaMkqn+4IOOK8x2 uxIpDDD+XJt1zCh6R1TVlo0jZTYknaplnw1hOrH97kxbmRSA5Xj/xth9yKalGYpzFaa/ vXcChUqWkT2QTcVrq21GjcWj9axTcLf6VAikPh/nQB9RYlJJNaWz9dSsCHYzXk+pKgZ7 h/wxMjLaJ7FOfl79Bx8tYooTxJgVWfPHLvZfG89xR/CTdTW8KfP2E1XBf5k+pujJfMBS BkZZLffbXSPK3zQhUTyXws0iZ/SOOSl9TvUeMTC1YUWIjIDNEtuX/jvWixLSoOPkUPiG 26iA== 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=vuBvxRECXbcBzgQOVlfLz/pAdVh4NVAHPXbqBfpWaww=; b=PBYZ9jW4pq3QUNDhobmnOUa7Od5R40PN+gnuR9Js4Jhg4b2axELd34L2I1Rp+L4o2e yonpTz+cY+Vpa3dGjHfBpiEeyzdRd3bBnyNEjJDvUUueBkjgwE5yV8BFrYqsLKU+REZS qiQk/kRmV2SrEpN8ZtVn4oda01G7Yg4YlXBXGJt2Joskb+S26F+bKkag0Ghgk658AJZu 4KNojV7BK7bjaAis21YT3PiuxhLuEj+pwMc/N8MGzjPMeOarb4+qb9qhHLQEHTwo+Tsg JRYPuPzxWk6hlBiszcd4Xaaxg6VJaoajw8ojo/XI2tobmlBvRQnkF8wiRLDEucdLgMNw xPtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=acVrDZpU; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id p26-20020a056a000a1a00b00505d9c44e97si15254809pfh.320.2022.05.08.19.01.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 19:01:45 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=acVrDZpU; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D7B6C27CE2; Sun, 8 May 2022 19:00:36 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354739AbiEDRCP (ORCPT + 99 others); Wed, 4 May 2022 13:02:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354409AbiEDQ5I (ORCPT ); Wed, 4 May 2022 12:57:08 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 476E049F91; Wed, 4 May 2022 09:50:00 -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 dfw.source.kernel.org (Postfix) with ESMTPS id CECB2617BD; Wed, 4 May 2022 16:49:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 27DA1C385A5; Wed, 4 May 2022 16:49:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1651682999; bh=m8EhxSzt2rZcv42yO5sG7Li9fTis8ptXEoUNaclR5eY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=acVrDZpUmJRVK7QKAf4+W3o5HM22FQNCRa7c3DHR/eWSw7rx3uNJM5eK26b91LXsK v3lphJYHbYpoK2dDEDbcgV29zsaneA1wM0XlGP+W0iVcgWKBGUjVqGcaEKmZ80HtLT zzTVii1yDiEyuZkycOwzIPfJQTZFcTBRMqjUw9Bk= 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.10 028/129] serial: imx: fix overrun interrupts in DMA mode Date: Wed, 4 May 2022 18:43:40 +0200 Message-Id: <20220504153023.511605289@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220504153021.299025455@linuxfoundation.org> References: <20220504153021.299025455@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=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 @@ -1470,7 +1470,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;