Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74638C433E0 for ; Wed, 23 Dec 2020 02:27:54 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0D3E0206EC for ; Wed, 23 Dec 2020 02:27:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0D3E0206EC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=dp/nEa2oFrNumsli/Idrdgr/J0dAeOnpA9Id+4yFz68=; b=EykubAkCdtAziiAuOjCeqlAc5 p9eNXKuU4uNdHN/poufVXvVDU6bBUbJrT7f+TsXn0xT6Hee17MQSfQblsKuyTzkXVMX7D1Pue6stV UIzwulzcpS0YTi/8+AYTgTKHFYTAQkJtcO+sMpsWWzKyIk13LcXGZ8uyslVk0APzDnHkV/aUUTYic OsHFK6+TY8PSNLXfYYZsE7AZdTsXGYLdUYOzuspUDMNWW/mXzadb/Ka3KfW2uD3K9mIB0086AUdC1 v9AP9n9sJBuM8tHYDgp/aeGkkX3IruuSujxfKZJ0ISZyYK+tiHJRaP1X3+0LPZ6ipp+zwR+uQaDh8 zYL4YE2DA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1krtqK-0003FP-6e; Wed, 23 Dec 2020 02:25:36 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1krtn9-0001Uz-9G for linux-arm-kernel@lists.infradead.org; Wed, 23 Dec 2020 02:22:20 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 269E4225AA; Wed, 23 Dec 2020 02:22:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1608690136; bh=BbtAdIFgjwoHhKSVKJdvtiuvyo+q+gYt02aUQcUTrm4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KW4vseZTOIReZFsNY1YcRGfFgdSVjSqSdenC0qqJN49QKxvEHsxb8iHiYV9SZh9cu uGFAvUi0Gh7vIsy2b478efrS34hcZ2fEoYv5kdnIp6iS0ekDEOiAWeHiFK7W2uaZQD 8I6UTtC0EqjoN8dOX0pTYFUAx7HHzaYI4CKMNBcP+jl9ZBZsAauYjEPGs9iW+7MmRz j8jCXRIi4EyKvqs1KvpcBuqtZBoNbrboigOUZAKn8i8HmiO4f89q7MygOK3e1TQO4n 7W14zKx1NZwzfAhzGobOKO9Tf0NCTYhGLbM1Tn9o6Xb4IiecXHjIwC3NyDYKeMz/Mx bH+pPx0IyPGIg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 59/87] tty/serial/imx: Enable TXEN bit in imx_poll_init(). Date: Tue, 22 Dec 2020 21:20:35 -0500 Message-Id: <20201223022103.2792705-59-sashal@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201223022103.2792705-1-sashal@kernel.org> References: <20201223022103.2792705-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201222_212219_775352_1863A37D X-CRM114-Status: GOOD ( 11.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sasha Levin , Mingrui Ren , linux-arm-kernel@lists.infradead.org, linux-serial@vger.kernel.org, Greg Kroah-Hartman Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Mingrui Ren [ Upstream commit aef1b6a27970607721a618a0b990716ca8dbbf97 ] As described in Documentation, poll_init() is called by kgdb to initialize hardware which supports both poll_put_char() and poll_get_char(). It's necessary to enable TXEN bit, otherwise, it will cause hardware fault and kernel panic when calling imx_poll_put_char(). Generally, if use /dev/ttymxc0 as kgdb console as well as system console, ttymxc0 is initialized early by system console which does enable TXEN bit.But when use /dev/ttymxc1 as kgbd console, ttymxc1 is only initialized by imx_poll_init() cannot enable the TXEN bit, which will cause kernel panic. Signed-off-by: Mingrui Ren Link: https://lore.kernel.org/r/20201202072543.151-1-972931182@qq.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/tty/serial/imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 7a6e26b12bf64..f3626ee1b06a2 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -1784,7 +1784,7 @@ static int imx_uart_poll_init(struct uart_port *port) ucr1 |= UCR1_UARTEN; ucr1 &= ~(UCR1_TXMPTYEN | UCR1_RTSDEN | UCR1_RRDYEN); - ucr2 |= UCR2_RXEN; + ucr2 |= UCR2_RXEN | UCR2_TXEN; ucr2 &= ~UCR2_ATEN; imx_uart_writel(sport, ucr1, UCR1); -- 2.27.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel