Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp6290782iob; Tue, 10 May 2022 15:03:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBWdh4yUosOYeFgsIaW8Q4InRjiK++dKX2kHxVMZF6vC8AhjBxgAaOPjURCmZB36awk7cN X-Received: by 2002:a17:907:7745:b0:6f3:674a:339 with SMTP id kx5-20020a170907774500b006f3674a0339mr21582321ejc.207.1652220219506; Tue, 10 May 2022 15:03:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652220219; cv=none; d=google.com; s=arc-20160816; b=DuIfwlR2ubmBonVE9CKSETEeOMbrqaTEdo722XxSXUmflZ6jkJAZsUCvqVx48wW7K/ CbexXeTv0W1DEUT1EpB7pJzyRAc3FrZGM/3xO7wwqEWKJfGTV6y19Whch9L6EN1qeLFD ypGqKDjtN46kmPdzoNyx1BkTcHAUDVNo8OG4vj2ikbSkz4pyW1YuHc92BhmZD0va1KYd BX9valgkW7e/ggZlVuPf/UBbAe5HQDSvUq8jGu+y2c/KDwORTTNu7d1G8fuYfaazCUD0 nwgR6CuGJtyrNq061n7tfyDerpfV09cCXjZCl6KsPJYr3IbkHGCcBYM/WFr5hFMoM9x1 5yxQ== 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=PwX0hzJ2SyuD/QcH0DgQdZs2KIHvFiswj3BAKmL0FMw=; b=D/LBXaKg/xMax2PbYE4kEZXNM56SIKukNXaxZglhihqN/SrEU4I9wLxfIy8YI6Gwse CGCmH+lWe2+OKLQXximhnkr99WTrMn2+IWViFXTPNyYdpUkiAncOwLFiqTeajLXHjj6m 5JJShTos8TXGOD9vRRPQy497c7dFpsmQtbty030JFFd+RTeYP8xP14NTt4tgMI6GsTYL J5rvxbToxVH+BYEEsYjKx/iqyVGw1+uJ5lAxkYhH08e1hxsP1M6D3okZEfK2ex994MN9 nuYqOkJU75Xv/1p18WLTMBO0GNrw4jX9jf2aFUN0w/VvLzMRd3YQ30Ox6KzSzHBnq3hZ MTxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ywogkjin; 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 dt8-20020a170907728800b006f3a02976f6si421109ejc.484.2022.05.10.15.03.15; Tue, 10 May 2022 15:03:39 -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=ywogkjin; 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 S243415AbiEJNdf (ORCPT + 99 others); Tue, 10 May 2022 09:33:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242976AbiEJNZT (ORCPT ); Tue, 10 May 2022 09:25:19 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1A6C229FE4; Tue, 10 May 2022 06:18:28 -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 2966C61707; Tue, 10 May 2022 13:18:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 287F8C385C6; Tue, 10 May 2022 13:18:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1652188707; bh=splPW+3YbvYkpcz/Ca/ySeLcEBXwqBz273Zt3NCyp9o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ywogkjinJCNj7GgfueQOsV1UWDDLv7M8kOWeV66Npusm7shtMUqld8CsggwwnN6Gc GRqjLOaLlLGA+4snt4wir9GlVwYCAtXiYpPQryM3+nEdPqr3a725bu93s1KQiykD3j SKrhIovTB5eqv4RlnMci8aW2602hVRMWoDxUKj0o= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Maciej W. Rozycki" , Andy Shevchenko Subject: [PATCH 4.19 18/88] serial: 8250: Also set sticky MCR bits in console restoration Date: Tue, 10 May 2022 15:07:03 +0200 Message-Id: <20220510130734.276790150@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220510130733.735278074@linuxfoundation.org> References: <20220510130733.735278074@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,URIBL_BLOCKED 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: Maciej W. Rozycki commit 6e6eebdf5e2455f089ccd000754a0deaeb79af82 upstream. Sticky MCR bits are lost in console restoration if console suspending has been disabled. This currently affects the AFE bit, which works in combination with RTS which we set, so we want to make sure the UART retains control of its FIFO where previously requested. Also specific drivers may need other bits in the future. Signed-off-by: Maciej W. Rozycki Fixes: 4516d50aabed ("serial: 8250: Use canary to restart console after suspend") Cc: stable@vger.kernel.org # v4.0+ Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/alpine.DEB.2.21.2204181518490.9383@angie.orcam.me.uk Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/8250/8250_port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/tty/serial/8250/8250_port.c +++ b/drivers/tty/serial/8250/8250_port.c @@ -3273,7 +3273,7 @@ static void serial8250_console_restore(s serial8250_set_divisor(port, baud, quot, frac); serial_port_out(port, UART_LCR, up->lcr); - serial8250_out_MCR(up, UART_MCR_DTR | UART_MCR_RTS); + serial8250_out_MCR(up, up->mcr | UART_MCR_DTR | UART_MCR_RTS); } /*