Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'tty-5.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty/serial/fbcon fixes from Greg KH:
"Here are some small tty/serial and one more fbcon fix.

They include:

- serial core locking regression fixes

- new device ids for 8250_pci driver

- fbcon fix for syzbot found issue

All have been in linux-next with no reported issues"

* tag 'tty-5.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
fbcon: Fix user font detection test at fbcon_resize().
serial: 8250_pci: Add Realtek 816a and 816b
serial: core: fix console port-lock regression
serial: core: fix port-lock initialisation

+33 -25
+11
drivers/tty/serial/8250/8250_pci.c
··· 5566 5566 PCI_ANY_ID, PCI_ANY_ID, 5567 5567 0, 0, pbn_wch384_4 }, 5568 5568 5569 + /* 5570 + * Realtek RealManage 5571 + */ 5572 + { PCI_VENDOR_ID_REALTEK, 0x816a, 5573 + PCI_ANY_ID, PCI_ANY_ID, 5574 + 0, 0, pbn_b0_1_115200 }, 5575 + 5576 + { PCI_VENDOR_ID_REALTEK, 0x816b, 5577 + PCI_ANY_ID, PCI_ANY_ID, 5578 + 0, 0, pbn_b0_1_115200 }, 5579 + 5569 5580 /* Fintek PCI serial cards */ 5570 5581 { PCI_DEVICE(0x1c29, 0x1104), .driver_data = pbn_fintek_4 }, 5571 5582 { PCI_DEVICE(0x1c29, 0x1108), .driver_data = pbn_fintek_8 },
+20 -24
drivers/tty/serial/serial_core.c
··· 1916 1916 return uart_console(port) && (port->cons->flags & CON_ENABLED); 1917 1917 } 1918 1918 1919 - static void __uart_port_spin_lock_init(struct uart_port *port) 1919 + static void uart_port_spin_lock_init(struct uart_port *port) 1920 1920 { 1921 1921 spin_lock_init(&port->lock); 1922 1922 lockdep_set_class(&port->lock, &port_lock_key); 1923 - } 1924 - 1925 - /* 1926 - * Ensure that the serial console lock is initialised early. 1927 - * If this port is a console, then the spinlock is already initialised. 1928 - */ 1929 - static inline void uart_port_spin_lock_init(struct uart_port *port) 1930 - { 1931 - if (uart_console(port)) 1932 - return; 1933 - 1934 - __uart_port_spin_lock_init(port); 1935 1923 } 1936 1924 1937 1925 #if defined(CONFIG_SERIAL_CORE_CONSOLE) || defined(CONFIG_CONSOLE_POLL) ··· 2074 2086 struct ktermios termios; 2075 2087 static struct ktermios dummy; 2076 2088 2077 - uart_port_spin_lock_init(port); 2089 + /* 2090 + * Ensure that the serial-console lock is initialised early. 2091 + * 2092 + * Note that the console-enabled check is needed because of kgdboc, 2093 + * which can end up calling uart_set_options() for an already enabled 2094 + * console via tty_find_polling_driver() and uart_poll_init(). 2095 + */ 2096 + if (!uart_console_enabled(port) && !port->console_reinit) 2097 + uart_port_spin_lock_init(port); 2078 2098 2079 2099 memset(&termios, 0, sizeof(struct ktermios)); 2080 2100 ··· 2373 2377 2374 2378 /* Power up port for set_mctrl() */ 2375 2379 uart_change_pm(state, UART_PM_STATE_ON); 2376 - 2377 - /* 2378 - * If this driver supports console, and it hasn't been 2379 - * successfully registered yet, initialise spin lock for it. 2380 - */ 2381 - if (port->cons && !(port->cons->flags & CON_ENABLED)) 2382 - __uart_port_spin_lock_init(port); 2383 2380 2384 2381 /* 2385 2382 * Ensure that the modem control lines are de-activated. ··· 2790 2801 if (oldconsole && !newconsole) { 2791 2802 ret = unregister_console(uport->cons); 2792 2803 } else if (!oldconsole && newconsole) { 2793 - if (uart_console(uport)) 2804 + if (uart_console(uport)) { 2805 + uport->console_reinit = 1; 2794 2806 register_console(uport->cons); 2795 - else 2807 + } else { 2796 2808 ret = -ENOENT; 2809 + } 2797 2810 } 2798 2811 } else { 2799 2812 ret = -ENXIO; ··· 2891 2900 goto out; 2892 2901 } 2893 2902 2894 - uart_port_spin_lock_init(uport); 2903 + /* 2904 + * If this port is in use as a console then the spinlock is already 2905 + * initialised. 2906 + */ 2907 + if (!uart_console_enabled(uport)) 2908 + uart_port_spin_lock_init(uport); 2895 2909 2896 2910 if (uport->cons && uport->dev) 2897 2911 of_console_check(uport->dev->of_node, uport->cons->name, uport->line);
+1 -1
drivers/video/fbdev/core/fbcon.c
··· 2018 2018 struct fb_var_screeninfo var = info->var; 2019 2019 int x_diff, y_diff, virt_w, virt_h, virt_fw, virt_fh; 2020 2020 2021 - if (ops->p && ops->p->userfont && FNTSIZE(vc->vc_font.data)) { 2021 + if (p->userfont && FNTSIZE(vc->vc_font.data)) { 2022 2022 int size; 2023 2023 int pitch = PITCH(vc->vc_font.width); 2024 2024
+1
include/linux/serial_core.h
··· 248 248 249 249 unsigned char hub6; /* this should be in the 8250 driver */ 250 250 unsigned char suspended; 251 + unsigned char console_reinit; 251 252 const char *name; /* port name */ 252 253 struct attribute_group *attr_group; /* port specific attributes */ 253 254 const struct attribute_group **tty_groups; /* all attributes (serial core use only) */