Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1944904iob; Thu, 5 May 2022 11:28:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYClcsKrhdB1gmabP0Nhf6tLiv5BstAnze87Wub+LEO7CPN2nH3ffI20cMB8D4zm+7kPHy X-Received: by 2002:a17:902:6a8a:b0:156:8ff6:daf0 with SMTP id n10-20020a1709026a8a00b001568ff6daf0mr28581946plk.117.1651775336959; Thu, 05 May 2022 11:28:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651775336; cv=none; d=google.com; s=arc-20160816; b=QzKy7AawJrXtPUyOV6cR8r3YlbMPGDwq2lkZIF2ZRBdgHtdYRwlk6/mNl3JA8pUtOC 2uSYVdAOzcmzqzFXsSBuDRXjBAXVUvyQfEaNDuCn+dHPnn1T9gCPwvg9wvn6bYseH8Ux oPo2X6CqxH4WRjPc2nL9B2qfNYsjA9roWVveb9+H+tA4EZ5yjAltOsY1bSuihhPE9WO5 5IXWkwcck21pDHxTFiLIdjLsJm679IqipN73jg7v1fUUtZjb18Rh8slbFSAJML4nOXFb iU3Uf/PLV/Cf/jUb5/vbtaBYMDZ9GvPE/LBTX9a1vnjP1DXRu5Egn18ohPAcjC/VW+SR 27FA== 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=gkdsRWmVSKJKuP+i5XpOv7pxvipd+DHTEO65nKTQncI=; b=i5fCWkj0qutDOQf99z+AJurQY5cVTZBK0wRsfSStWvTCeZlRHqup8M2uYxe+4FR7fJ HtV+mvZK19KUup0AK+/pWKt2YF2cxXny1NB9rfrd2VjKZsDleYByAgQknxv6UePJx23j q/DUzrTz6BABp5vmzahEyUJYHdcxLvkCYiSprx7jGKzqBtsBwTIc5jDN6VHitR0sKLcs pv8tQFcsXyA7jUz9P/L45LDMsHJ87TQ/vwx7WaqUtOogCq6yprSAOig9We2Z7NEwKpb1 4mmpbUaUodks5n4c87Jf8CxCi3Acva/A3WUOVgUCNGqw8ZdLOo2HBsUCCFnVe5bKxMbI X3Lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=I6nlNeOD; 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 l5-20020a056a0016c500b004fa3a8e007fsi2521160pfc.310.2022.05.05.11.28.38; Thu, 05 May 2022 11:28:56 -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=I6nlNeOD; 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 S1357871AbiEDRPY (ORCPT + 99 others); Wed, 4 May 2022 13:15:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355444AbiEDRE2 (ORCPT ); Wed, 4 May 2022 13:04:28 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F9B54EA23; Wed, 4 May 2022 09:53:03 -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 940B3617DE; Wed, 4 May 2022 16:53:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E1A6CC385A4; Wed, 4 May 2022 16:52:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1651683180; bh=RxD54wOIf+gtesh7VHfBEjiXkcaf7g6pr7I4+AwcUM8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I6nlNeODBqhzd3ClvX6epppH5w1bJRUuwozvWubRaaPse6vTYd3y4xaEjWFCqf7Ax Q5u/kHw1z1HVXjg4go7dj6PQVnvR/MB87CAEgB9Ty9bbpDgtazB6sD1S1yw1tPc9/T ly23VCySTQ98NVmKwxqEGTzkkFFZeFWgOiL53+mk= 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 5.15 031/177] serial: 8250: Also set sticky MCR bits in console restoration Date: Wed, 4 May 2022 18:43:44 +0200 Message-Id: <20220504153055.785959388@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: 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 @@ -3340,7 +3340,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); } /*