Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4782861iob; Mon, 9 May 2022 01:15:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxngQsyx8JKHzBTS4q0Py7GjyA2TqXj9szZ74lOg9OvQYxZGgNo0CFUMXtc7+nPKvpXrObe X-Received: by 2002:a63:408:0:b0:3c1:eb46:1810 with SMTP id 8-20020a630408000000b003c1eb461810mr12343655pge.199.1652084101206; Mon, 09 May 2022 01:15:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652084101; cv=none; d=google.com; s=arc-20160816; b=q6kak2zIERk+9ZFMXYDMapdJqPjEN0uMU0nx5eUOTsLL7zQzC+hUl9Yn6G3RgoE2OC WHGim67AVu7+bnr5P0ypw6IhcNtIefE/deahMrBaj9ouWbTjTyPKJiY/00yRiBBAy1Ee /gw4x+SwW3WqwCKe6NYLCIdaa2MzdYXGUyNp9r7OQZwBVFX8/xd3GVHbdsMQwEqvBMSG doJO7kT1LO8u1XKs3qqqSQnJoRD/dDj8XMozZeY2eVg6GIyNHjM7oaaQZ8X3l7ZWczaD A/q3uGKn5NNzjneMGfwXRWNZVxABB6IsKvxQzKekyLO61B8DthSUFHxTh6Bu/032A12D msTw== 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=WQur40gjbAwl2/8sCnpbD+6cH/GVkShJdwwsjXRbm0E=; b=x3S4EWy2V+fwaQItbVFVKkoOgDbOoQye6ntT7kBxiVdKWKxTcUrV4V7tnc62a1yoaI hmNL5MX945rixqf6Iy8CatPw/bdg75lju0D69imd+4BXscKISnHiBiSFZ2IHvnj/27Ng J7N3jz6nrQl/JLHvfQGCPmEjrWrQ8bPnyOjL9IszKxaTek8f+Oz9nuzN6H6Q8WGcpmEZ KjsdNvUuPDaJFfH+pXuJ+cMXkpbY0nNuOiDaL/z9KS7sP7NIHP+8Plh+AtvG9p7YxwOB BjcAWmWEzD7quysNd30B5RtRhiFMr39/1qtX2yctSOMZm3flEmXMfu8UDfvh/v1GSI34 ewWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TTNWclTM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id r74-20020a632b4d000000b003c6d5d28d7esi1237718pgr.176.2022.05.09.01.15.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 01:15:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TTNWclTM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 AB0241B57B0; Mon, 9 May 2022 01:04:43 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353914AbiEDQxD (ORCPT + 99 others); Wed, 4 May 2022 12:53:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353462AbiEDQwF (ORCPT ); Wed, 4 May 2022 12:52:05 -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 0CC2246B1B; Wed, 4 May 2022 09:48:29 -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 8F9F7B82554; Wed, 4 May 2022 16:48:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 290ADC385A5; Wed, 4 May 2022 16:48:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1651682906; bh=PLKG9VCw6OMLHK3dy/C9Ge+4cO91A/OgGkF/yzWulpY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TTNWclTMEO9U19NZOKKddjYzQqlwOq3C5aDe8Yb2vPnOedwzypxvvg/Kli9EJjzMS oAV8mED/Tdd0c/GuSSCvLjWAxwUiVQNBf6EB6OpL5ixGsY0c63Lrj+r5J7hxPQH70S xO9D965ihQnL7N97vVeS7CZ0sUm2Utuf6xJB8d3I= 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.4 24/84] serial: 8250: Also set sticky MCR bits in console restoration Date: Wed, 4 May 2022 18:44:05 +0200 Message-Id: <20220504152929.482826578@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220504152927.744120418@linuxfoundation.org> References: <20220504152927.744120418@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: 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 @@ -3184,7 +3184,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); } /*