The commit is pushed to "branch-rh9-5.14.0-284.25.1.vz9.30.x-ovz" and will 
appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh9-5.14.0-284.25.1.vz9.30.10
------>
commit 58d30bbc65764ab66cd7db55d956e3dcc12feab6
Author: Ilpo Järvinen <ilpo.jarvi...@linux.intel.com>
Date:   Tue Aug 16 14:57:34 2022 +0300

    ms/serial: dz: Assume previous baudrate is valid
    
    Assume previously used termios has a valid baudrate and use
    it directly.
    
    Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com>
    Acked-by: Maciej W. Rozycki <ma...@orcam.me.uk>
    Signed-off-by: Ilpo Järvinen <ilpo.jarvi...@linux.intel.com>
    Link: 
https://lore.kernel.org/r/20220816115739.10928-4-ilpo.jarvi...@linux.intel.com
    Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>
    
    Getting rid of compilation warnings.
    
    https://virtuozzo.atlassian.net/browse/PSBM-148793
    
    Feature: fix ms/drivers
    
    (cherry picked from commit c87391b5dd77fbd4fd0b0a96fa867a169842b0a9)
    Signed-off-by: Konstantin Khorenko <khore...@virtuozzo.com>
---
 drivers/tty/serial/dz.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/tty/serial/dz.c b/drivers/tty/serial/dz.c
index 725cd9673dfc..829b452daee9 100644
--- a/drivers/tty/serial/dz.c
+++ b/drivers/tty/serial/dz.c
@@ -592,9 +592,12 @@ static void dz_set_termios(struct uart_port *uport, struct 
ktermios *termios,
 
        baud = uart_get_baud_rate(uport, termios, old_termios, 50, 9600);
        bflag = dz_encode_baud_rate(baud);
-       if (bflag < 0)  {                       /* Try to keep unchanged.  */
-               baud = uart_get_baud_rate(uport, old_termios, NULL, 50, 9600);
-               bflag = dz_encode_baud_rate(baud);
+       if (bflag < 0)  {
+               if (old_termios) {
+                       /* Keep unchanged. */
+                       baud = tty_termios_baud_rate(old_termios);
+                       bflag = dz_encode_baud_rate(baud);
+               }
                if (bflag < 0)  {               /* Resort to 9600.  */
                        baud = 9600;
                        bflag = DZ_B9600;
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to