From: Chen Hu <hu1.chen@intel.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Chen Hu <hu1.chen@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jslaby@suse.com>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] serial: core: stop passing NULL in uart_resume_port
Date: Wed, 25 Jul 2018 18:04:50 +0800 [thread overview]
Message-ID: <20180725100450.22300-1-hu1.chen@intel.com> (raw)
We found the baud rate is changed after S3 on some Intel Broxton
platforms. The baud rate should be restored during resume. However, some
set_termios() callback such as dw8250_set_termios() for DesignWare 8250
will skip setting if old termios is NULL. We address this issue via
passing a dummy.
Signed-off-by: Chen Hu <hu1.chen@intel.com>
---
drivers/tty/serial/serial_core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index f02965936f2e..8b815f1539e8 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -2217,6 +2217,7 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport)
struct device *tty_dev;
struct uart_match match = {uport, drv};
struct ktermios termios;
+ static struct ktermios dummy;
mutex_lock(&port->mutex);
@@ -2277,7 +2278,7 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport)
pm_runtime_put_autosuspend(uport->dev);
if (ret == 0) {
if (tty)
- uart_change_speed(tty, state, NULL);
+ uart_change_speed(tty, state, &dummy);
pm_runtime_get_sync(uport->dev);
spin_lock_irq(&uport->lock);
ops->set_mctrl(uport, uport->mctrl);
--
2.13.0
next reply other threads:[~2018-07-25 10:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-25 10:04 Chen Hu [this message]
2018-07-25 22:01 ` Andy Shevchenko
2018-07-26 9:36 ` Chen Hu
2018-07-26 14:04 ` Andy Shevchenko
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=20180725100450.22300-1-hu1.chen@intel.com \
--to=hu1.chen@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®