All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@orcam.me.uk>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jirislaby@kernel.org>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
	linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: [PATCH v5 1/5] serial: 8250: Also set sticky MCR bits in console restoration
Date: Mon, 18 Apr 2022 16:27:10 +0100 (BST)	[thread overview]
Message-ID: <alpine.DEB.2.21.2204181518490.9383@angie.orcam.me.uk> (raw)
In-Reply-To: <alpine.DEB.2.21.2204181506000.9383@angie.orcam.me.uk>

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 <macro@orcam.me.uk>
Fixes: 4516d50aabed ("serial: 8250: Use canary to restart console after suspend")
Cc: stable@vger.kernel.org # v4.0+
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
---
Changes from v4:

- Reorder as 1/5 (from 4/5).

New change in v4, factored out from 5/5.
---
 drivers/tty/serial/8250/8250_port.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

linux-serial-8250-mcr-restore.diff
Index: linux-macro/drivers/tty/serial/8250/8250_port.c
===================================================================
--- linux-macro.orig/drivers/tty/serial/8250/8250_port.c
+++ linux-macro/drivers/tty/serial/8250/8250_port.c
@@ -3308,7 +3308,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);
 }
 
 /*

  reply	other threads:[~2022-04-18 15:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-18 15:27 [PATCH v5 0/5] serial: 8250: Fixes for Oxford Semiconductor 950 UARTs Maciej W. Rozycki
2022-04-18 15:27 ` Maciej W. Rozycki [this message]
2022-04-18 15:27 ` [PATCH v5 2/5] serial: 8250: Correct the clock for EndRun PTP/1588 PCIe device Maciej W. Rozycki
2022-04-18 15:27 ` [PATCH v5 3/5] serial: 8250: Fold EndRun device support into OxSemi Tornado code Maciej W. Rozycki
2022-04-18 15:27 ` [PATCH v5 4/5] serial: 8250: Export ICR access helpers for internal use Maciej W. Rozycki
2022-04-18 15:27 ` [PATCH v5 5/5] serial: 8250: Add proper clock handling for OxSemi PCIe devices Maciej W. Rozycki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.21.2204181518490.9383@angie.orcam.me.uk \
    --to=macro@orcam.me.uk \
    --cc=andy.shevchenko@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.