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-6.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty / serial / console fixes from Greg KH:
"Here are a bunch of fixes/reverts for 6.10-rc6. Include in here are:

- revert the bunch of tty/serial/console changes that landed in -rc1
that didn't quite work properly yet.

Everyone agreed to just revert them for now and will work on making
them better for a future release instead of trying to quick fix the
existing changes this late in the release cycle

- 8250 driver port count bugfix

- Other tiny serial port bugfixes for reported issues

All of these have been in linux-next this week with no reported
issues"

* tag 'tty-6.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
Revert "printk: Save console options for add_preferred_console_match()"
Revert "printk: Don't try to parse DEVNAME:0.0 console options"
Revert "printk: Flag register_console() if console is set on command line"
Revert "serial: core: Add support for DEVNAME:0.0 style naming for kernel console"
Revert "serial: core: Handle serial console options"
Revert "serial: 8250: Add preferred console in serial8250_isa_init_ports()"
Revert "Documentation: kernel-parameters: Add DEVNAME:0.0 format for serial ports"
Revert "serial: 8250: Fix add preferred console for serial8250_isa_init_ports()"
Revert "serial: core: Fix ifdef for serial base console functions"
serial: bcm63xx-uart: fix tx after conversion to uart_port_tx_limited()
serial: core: introduce uart_port_tx_limited_flags()
Revert "serial: core: only stop transmit when HW fifo is empty"
serial: imx: set receiver level before starting uart
tty: mcf: MCF54418 has 10 UARTS
serial: 8250_omap: Implementation of Errata i2310
tty: serial: 8250: Fix port count mismatch with the device

+65 -374
-19
Documentation/admin-guide/kernel-parameters.txt
··· 788 788 Documentation/networking/netconsole.rst for an 789 789 alternative. 790 790 791 - <DEVNAME>:<n>.<n>[,options] 792 - Use the specified serial port on the serial core bus. 793 - The addressing uses DEVNAME of the physical serial port 794 - device, followed by the serial core controller instance, 795 - and the serial port instance. The options are the same 796 - as documented for the ttyS addressing above. 797 - 798 - The mapping of the serial ports to the tty instances 799 - can be viewed with: 800 - 801 - $ ls -d /sys/bus/serial-base/devices/*:*.*/tty/* 802 - /sys/bus/serial-base/devices/00:04:0.0/tty/ttyS0 803 - 804 - In the above example, the console can be addressed with 805 - console=00:04:0.0. Note that a console addressed this 806 - way will only get added when the related device driver 807 - is ready. The use of an earlycon parameter in addition to 808 - the console may be desired for console output early on. 809 - 810 791 uart[8250],io,<addr>[,options] 811 792 uart[8250],mmio,<addr>[,options] 812 793 uart[8250],mmio16,<addr>[,options]
-5
drivers/tty/serial/8250/8250_core.c
··· 15 15 */ 16 16 17 17 #include <linux/acpi.h> 18 - #include <linux/cleanup.h> 19 18 #include <linux/module.h> 20 19 #include <linux/moduleparam.h> 21 20 #include <linux/ioport.h> ··· 40 41 #endif 41 42 42 43 #include <asm/irq.h> 43 - 44 - #include "../serial_base.h" /* For serial_base_add_isa_preferred_console() */ 45 44 46 45 #include "8250.h" 47 46 ··· 560 563 port->irqflags |= irqflag; 561 564 if (serial8250_isa_config != NULL) 562 565 serial8250_isa_config(i, &up->port, &up->capabilities); 563 - 564 - serial_base_add_isa_preferred_console(serial8250_reg.dev_name, i); 565 566 } 566 567 } 567 568
+20 -5
drivers/tty/serial/8250/8250_omap.c
··· 115 115 /* RX FIFO occupancy indicator */ 116 116 #define UART_OMAP_RX_LVL 0x19 117 117 118 + /* Timeout low and High */ 119 + #define UART_OMAP_TO_L 0x26 120 + #define UART_OMAP_TO_H 0x27 121 + 118 122 /* 119 123 * Copy of the genpd flags for the console. 120 124 * Only used if console suspend is disabled ··· 667 663 668 664 /* 669 665 * On K3 SoCs, it is observed that RX TIMEOUT is signalled after 670 - * FIFO has been drained, in which case a dummy read of RX FIFO 671 - * is required to clear RX TIMEOUT condition. 666 + * FIFO has been drained or erroneously. 667 + * So apply solution of Errata i2310 as mentioned in 668 + * https://www.ti.com/lit/pdf/sprz536 672 669 */ 673 670 if (priv->habit & UART_RX_TIMEOUT_QUIRK && 674 - (iir & UART_IIR_RX_TIMEOUT) == UART_IIR_RX_TIMEOUT && 675 - serial_port_in(port, UART_OMAP_RX_LVL) == 0) { 676 - serial_port_in(port, UART_RX); 671 + (iir & UART_IIR_RX_TIMEOUT) == UART_IIR_RX_TIMEOUT) { 672 + unsigned char efr2, timeout_h, timeout_l; 673 + 674 + efr2 = serial_in(up, UART_OMAP_EFR2); 675 + timeout_h = serial_in(up, UART_OMAP_TO_H); 676 + timeout_l = serial_in(up, UART_OMAP_TO_L); 677 + serial_out(up, UART_OMAP_TO_H, 0xFF); 678 + serial_out(up, UART_OMAP_TO_L, 0xFF); 679 + serial_out(up, UART_OMAP_EFR2, UART_OMAP_EFR2_TIMEOUT_BEHAVE); 680 + serial_in(up, UART_IIR); 681 + serial_out(up, UART_OMAP_EFR2, efr2); 682 + serial_out(up, UART_OMAP_TO_H, timeout_h); 683 + serial_out(up, UART_OMAP_TO_L, timeout_l); 677 684 } 678 685 679 686 /* Stop processing interrupts on input overrun */
+12 -1
drivers/tty/serial/8250/8250_pci.c
··· 1985 1985 MOXA_SUPP_RS485 = BIT(2), 1986 1986 }; 1987 1987 1988 + static unsigned short moxa_get_nports(unsigned short device) 1989 + { 1990 + switch (device) { 1991 + case PCI_DEVICE_ID_MOXA_CP116E_A_A: 1992 + case PCI_DEVICE_ID_MOXA_CP116E_A_B: 1993 + return 8; 1994 + } 1995 + 1996 + return FIELD_GET(0x00F0, device); 1997 + } 1998 + 1988 1999 static bool pci_moxa_is_mini_pcie(unsigned short device) 1989 2000 { 1990 2001 if (device == PCI_DEVICE_ID_MOXA_CP102N || ··· 2049 2038 { 2050 2039 unsigned short device = dev->device; 2051 2040 resource_size_t iobar_addr = pci_resource_start(dev, 2); 2052 - unsigned int num_ports = (device & 0x00F0) >> 4, i; 2041 + unsigned int i, num_ports = moxa_get_nports(device); 2053 2042 u8 val, init_mode = MOXA_RS232; 2054 2043 2055 2044 if (!(pci_moxa_supported_rs(dev) & MOXA_SUPP_RS232)) {
+5 -2
drivers/tty/serial/bcm63xx_uart.c
··· 308 308 309 309 val = bcm_uart_readl(port, UART_MCTL_REG); 310 310 val = (val & UART_MCTL_TXFIFOFILL_MASK) >> UART_MCTL_TXFIFOFILL_SHIFT; 311 - 312 - pending = uart_port_tx_limited(port, ch, port->fifosize - val, 311 + pending = uart_port_tx_limited_flags(port, ch, UART_TX_NOSTOP, 312 + port->fifosize - val, 313 313 true, 314 314 bcm_uart_writel(port, ch, UART_FIFO_REG), 315 315 ({})); ··· 320 320 val = bcm_uart_readl(port, UART_IR_REG); 321 321 val &= ~UART_TX_INT_MASK; 322 322 bcm_uart_writel(port, val, UART_IR_REG); 323 + 324 + if (uart_tx_stopped(port)) 325 + bcm_uart_stop_tx(port); 323 326 } 324 327 325 328 /*
+3 -1
drivers/tty/serial/imx.c
··· 1952 1952 1953 1953 /* Make sure Rx is enabled in case Tx is active with Rx disabled */ 1954 1954 if (!(rs485conf->flags & SER_RS485_ENABLED) || 1955 - rs485conf->flags & SER_RS485_RX_DURING_TX) 1955 + rs485conf->flags & SER_RS485_RX_DURING_TX) { 1956 + imx_uart_setup_ufcr(sport, TXTL_DEFAULT, RXTL_DEFAULT); 1956 1957 imx_uart_start_rx(port); 1958 + } 1957 1959 1958 1960 return 0; 1959 1961 }
+1 -1
drivers/tty/serial/mcf.c
··· 462 462 .verify_port = mcf_verify_port, 463 463 }; 464 464 465 - static struct mcf_uart mcf_ports[4]; 465 + static struct mcf_uart mcf_ports[10]; 466 466 467 467 #define MCF_MAXPORTS ARRAY_SIZE(mcf_ports) 468 468
-30
drivers/tty/serial/serial_base.h
··· 49 49 50 50 int serial_core_register_port(struct uart_driver *drv, struct uart_port *port); 51 51 void serial_core_unregister_port(struct uart_driver *drv, struct uart_port *port); 52 - 53 - #ifdef CONFIG_SERIAL_CORE_CONSOLE 54 - 55 - int serial_base_add_preferred_console(struct uart_driver *drv, 56 - struct uart_port *port); 57 - 58 - #else 59 - 60 - static inline 61 - int serial_base_add_preferred_console(struct uart_driver *drv, 62 - struct uart_port *port) 63 - { 64 - return 0; 65 - } 66 - 67 - #endif 68 - 69 - #ifdef CONFIG_SERIAL_8250_CONSOLE 70 - 71 - int serial_base_add_isa_preferred_console(const char *name, int idx); 72 - 73 - #else 74 - 75 - static inline 76 - int serial_base_add_isa_preferred_console(const char *name, int idx) 77 - { 78 - return 0; 79 - } 80 - 81 - #endif
-129
drivers/tty/serial/serial_base_bus.c
··· 8 8 * The serial core bus manages the serial core controller instances. 9 9 */ 10 10 11 - #include <linux/cleanup.h> 12 11 #include <linux/container_of.h> 13 12 #include <linux/device.h> 14 13 #include <linux/idr.h> ··· 203 204 ida_free(&ctrl_dev->port_ida, port_dev->port->port_id); 204 205 put_device(&port_dev->dev); 205 206 } 206 - 207 - #ifdef CONFIG_SERIAL_CORE_CONSOLE 208 - 209 - static int serial_base_add_one_prefcon(const char *match, const char *dev_name, 210 - int port_id) 211 - { 212 - int ret; 213 - 214 - ret = add_preferred_console_match(match, dev_name, port_id); 215 - if (ret == -ENOENT) 216 - return 0; 217 - 218 - return ret; 219 - } 220 - 221 - #ifdef __sparc__ 222 - 223 - /* Handle Sparc ttya and ttyb options as done in console_setup() */ 224 - static int serial_base_add_sparc_console(const char *dev_name, int idx) 225 - { 226 - const char *name; 227 - 228 - switch (idx) { 229 - case 0: 230 - name = "ttya"; 231 - break; 232 - case 1: 233 - name = "ttyb"; 234 - break; 235 - default: 236 - return 0; 237 - } 238 - 239 - return serial_base_add_one_prefcon(name, dev_name, idx); 240 - } 241 - 242 - #else 243 - 244 - static inline int serial_base_add_sparc_console(const char *dev_name, int idx) 245 - { 246 - return 0; 247 - } 248 - 249 - #endif 250 - 251 - static int serial_base_add_prefcon(const char *name, int idx) 252 - { 253 - const char *char_match __free(kfree) = NULL; 254 - const char *nmbr_match __free(kfree) = NULL; 255 - int ret; 256 - 257 - /* Handle ttyS specific options */ 258 - if (strstarts(name, "ttyS")) { 259 - /* No name, just a number */ 260 - nmbr_match = kasprintf(GFP_KERNEL, "%i", idx); 261 - if (!nmbr_match) 262 - return -ENODEV; 263 - 264 - ret = serial_base_add_one_prefcon(nmbr_match, name, idx); 265 - if (ret) 266 - return ret; 267 - 268 - /* Sparc ttya and ttyb */ 269 - ret = serial_base_add_sparc_console(name, idx); 270 - if (ret) 271 - return ret; 272 - } 273 - 274 - /* Handle the traditional character device name style console=ttyS0 */ 275 - char_match = kasprintf(GFP_KERNEL, "%s%i", name, idx); 276 - if (!char_match) 277 - return -ENOMEM; 278 - 279 - return serial_base_add_one_prefcon(char_match, name, idx); 280 - } 281 - 282 - /** 283 - * serial_base_add_preferred_console - Adds a preferred console 284 - * @drv: Serial port device driver 285 - * @port: Serial port instance 286 - * 287 - * Tries to add a preferred console for a serial port if specified in the 288 - * kernel command line. Supports both the traditional character device such 289 - * as console=ttyS0, and a hardware addressing based console=DEVNAME:0.0 290 - * style name. 291 - * 292 - * Translates the kernel command line option using a hardware based addressing 293 - * console=DEVNAME:0.0 to the serial port character device such as ttyS0. 294 - * Cannot be called early for ISA ports, depends on struct device. 295 - * 296 - * Note that duplicates are ignored by add_preferred_console(). 297 - * 298 - * Return: 0 on success, negative error code on failure. 299 - */ 300 - int serial_base_add_preferred_console(struct uart_driver *drv, 301 - struct uart_port *port) 302 - { 303 - const char *port_match __free(kfree) = NULL; 304 - int ret; 305 - 306 - ret = serial_base_add_prefcon(drv->dev_name, port->line); 307 - if (ret) 308 - return ret; 309 - 310 - port_match = kasprintf(GFP_KERNEL, "%s:%i.%i", dev_name(port->dev), 311 - port->ctrl_id, port->port_id); 312 - if (!port_match) 313 - return -ENOMEM; 314 - 315 - /* Translate a hardware addressing style console=DEVNAME:0.0 */ 316 - return serial_base_add_one_prefcon(port_match, drv->dev_name, port->line); 317 - } 318 - 319 - #endif 320 - 321 - #ifdef CONFIG_SERIAL_8250_CONSOLE 322 - 323 - /* 324 - * Early ISA ports initialize the console before there is no struct device. 325 - * This should be only called from serial8250_isa_init_preferred_console(), 326 - * other callers are likely wrong and should rely on earlycon instead. 327 - */ 328 - int serial_base_add_isa_preferred_console(const char *name, int idx) 329 - { 330 - return serial_base_add_prefcon(name, idx); 331 - } 332 - 333 - #endif 334 207 335 208 static int serial_base_init(void) 336 209 {
-4
drivers/tty/serial/serial_core.c
··· 3422 3422 if (ret) 3423 3423 goto err_unregister_ctrl_dev; 3424 3424 3425 - ret = serial_base_add_preferred_console(drv, port); 3426 - if (ret) 3427 - goto err_unregister_port_dev; 3428 - 3429 3425 ret = serial_core_add_one_port(drv, port); 3430 3426 if (ret) 3431 3427 goto err_unregister_port_dev;
-3
include/linux/printk.h
··· 60 60 #define CONSOLE_LOGLEVEL_DEFAULT CONFIG_CONSOLE_LOGLEVEL_DEFAULT 61 61 #define CONSOLE_LOGLEVEL_QUIET CONFIG_CONSOLE_LOGLEVEL_QUIET 62 62 63 - int add_preferred_console_match(const char *match, const char *name, 64 - const short idx); 65 - 66 63 extern int console_printk[]; 67 64 68 65 #define console_loglevel (console_printk[0])
+19 -2
include/linux/serial_core.h
··· 811 811 if (pending < WAKEUP_CHARS) { \ 812 812 uart_write_wakeup(__port); \ 813 813 \ 814 - if (!((flags) & UART_TX_NOSTOP) && pending == 0 && \ 815 - __port->ops->tx_empty(__port)) \ 814 + if (!((flags) & UART_TX_NOSTOP) && pending == 0) \ 816 815 __port->ops->stop_tx(__port); \ 817 816 } \ 818 817 \ ··· 848 849 unsigned int __count = (count); \ 849 850 __uart_port_tx(port, ch, 0, tx_ready, put_char, tx_done, __count, \ 850 851 __count--); \ 852 + }) 853 + 854 + /** 855 + * uart_port_tx_limited_flags -- transmit helper for uart_port with count limiting with flags 856 + * @port: uart port 857 + * @ch: variable to store a character to be written to the HW 858 + * @flags: %UART_TX_NOSTOP or similar 859 + * @count: a limit of characters to send 860 + * @tx_ready: can HW accept more data function 861 + * @put_char: function to write a character 862 + * @tx_done: function to call after the loop is done 863 + * 864 + * See uart_port_tx_limited() for more details. 865 + */ 866 + #define uart_port_tx_limited_flags(port, ch, flags, count, tx_ready, put_char, tx_done) ({ \ 867 + unsigned int __count = (count); \ 868 + __uart_port_tx(port, ch, flags, tx_ready, put_char, tx_done, __count, \ 869 + __count--); \ 851 870 }) 852 871 853 872 /**
+1 -1
kernel/printk/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - obj-y = printk.o conopt.o 2 + obj-y = printk.o 3 3 obj-$(CONFIG_PRINTK) += printk_safe.o nbcon.o 4 4 obj-$(CONFIG_A11Y_BRAILLE_CONSOLE) += braille.o 5 5 obj-$(CONFIG_PRINTK_INDEX) += index.o
-146
kernel/printk/conopt.c
··· 1 - // SPDX-License-Identifier: GPL-2.0 2 - /* 3 - * Kernel command line console options for hardware based addressing 4 - * 5 - * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/ 6 - * Author: Tony Lindgren <tony@atomide.com> 7 - */ 8 - 9 - #include <linux/console.h> 10 - #include <linux/init.h> 11 - #include <linux/string.h> 12 - #include <linux/types.h> 13 - 14 - #include <asm/errno.h> 15 - 16 - #include "console_cmdline.h" 17 - 18 - /* 19 - * Allow longer DEVNAME:0.0 style console naming such as abcd0000.serial:0.0 20 - * in addition to the legacy ttyS0 style naming. 21 - */ 22 - #define CONSOLE_NAME_MAX 32 23 - 24 - #define CONSOLE_OPT_MAX 16 25 - #define CONSOLE_BRL_OPT_MAX 16 26 - 27 - struct console_option { 28 - char name[CONSOLE_NAME_MAX]; 29 - char opt[CONSOLE_OPT_MAX]; 30 - char brl_opt[CONSOLE_BRL_OPT_MAX]; 31 - u8 has_brl_opt:1; 32 - }; 33 - 34 - /* Updated only at console_setup() time, no locking needed */ 35 - static struct console_option conopt[MAX_CMDLINECONSOLES]; 36 - 37 - /** 38 - * console_opt_save - Saves kernel command line console option for driver use 39 - * @str: Kernel command line console name and option 40 - * @brl_opt: Braille console options 41 - * 42 - * Saves a kernel command line console option for driver subsystems to use for 43 - * adding a preferred console during init. Called from console_setup() only. 44 - * 45 - * Return: 0 on success, negative error code on failure. 46 - */ 47 - int __init console_opt_save(const char *str, const char *brl_opt) 48 - { 49 - struct console_option *con; 50 - size_t namelen, optlen; 51 - const char *opt; 52 - int i; 53 - 54 - namelen = strcspn(str, ","); 55 - if (namelen == 0 || namelen >= CONSOLE_NAME_MAX) 56 - return -EINVAL; 57 - 58 - opt = str + namelen; 59 - if (*opt == ',') 60 - opt++; 61 - 62 - optlen = strlen(opt); 63 - if (optlen >= CONSOLE_OPT_MAX) 64 - return -EINVAL; 65 - 66 - for (i = 0; i < MAX_CMDLINECONSOLES; i++) { 67 - con = &conopt[i]; 68 - 69 - if (con->name[0]) { 70 - if (!strncmp(str, con->name, namelen)) 71 - return 0; 72 - continue; 73 - } 74 - 75 - /* 76 - * The name isn't terminated, only opt is. Empty opt is fine, 77 - * but brl_opt can be either empty or NULL. For more info, see 78 - * _braille_console_setup(). 79 - */ 80 - strscpy(con->name, str, namelen + 1); 81 - strscpy(con->opt, opt, CONSOLE_OPT_MAX); 82 - if (brl_opt) { 83 - strscpy(con->brl_opt, brl_opt, CONSOLE_BRL_OPT_MAX); 84 - con->has_brl_opt = 1; 85 - } 86 - 87 - return 0; 88 - } 89 - 90 - return -ENOMEM; 91 - } 92 - 93 - static struct console_option *console_opt_find(const char *name) 94 - { 95 - struct console_option *con; 96 - int i; 97 - 98 - for (i = 0; i < MAX_CMDLINECONSOLES; i++) { 99 - con = &conopt[i]; 100 - if (!strcmp(name, con->name)) 101 - return con; 102 - } 103 - 104 - return NULL; 105 - } 106 - 107 - /** 108 - * add_preferred_console_match - Adds a preferred console if a match is found 109 - * @match: Expected console on kernel command line, such as console=DEVNAME:0.0 110 - * @name: Name of the console character device to add such as ttyS 111 - * @idx: Index for the console 112 - * 113 - * Allows driver subsystems to add a console after translating the command 114 - * line name to the character device name used for the console. Options are 115 - * added automatically based on the kernel command line. Duplicate preferred 116 - * consoles are ignored by __add_preferred_console(). 117 - * 118 - * Return: 0 on success, negative error code on failure. 119 - */ 120 - int add_preferred_console_match(const char *match, const char *name, 121 - const short idx) 122 - { 123 - struct console_option *con; 124 - char *brl_opt = NULL; 125 - 126 - if (!match || !strlen(match) || !name || !strlen(name) || 127 - idx < 0) 128 - return -EINVAL; 129 - 130 - con = console_opt_find(match); 131 - if (!con) 132 - return -ENOENT; 133 - 134 - /* 135 - * See __add_preferred_console(). It checks for NULL brl_options to set 136 - * the preferred_console flag. Empty brl_opt instead of NULL leads into 137 - * the preferred_console flag not set, and CON_CONSDEV not being set, 138 - * and the boot console won't get disabled at the end of console_setup(). 139 - */ 140 - if (con->has_brl_opt) 141 - brl_opt = con->brl_opt; 142 - 143 - console_opt_add_preferred_console(name, idx, con->opt, brl_opt); 144 - 145 - return 0; 146 - }
-6
kernel/printk/console_cmdline.h
··· 2 2 #ifndef _CONSOLE_CMDLINE_H 3 3 #define _CONSOLE_CMDLINE_H 4 4 5 - #define MAX_CMDLINECONSOLES 8 6 - 7 - int console_opt_save(const char *str, const char *brl_opt); 8 - int console_opt_add_preferred_console(const char *name, const short idx, 9 - char *options, char *brl_options); 10 - 11 5 struct console_cmdline 12 6 { 13 7 char name[16]; /* Name of the driver */
+4 -19
kernel/printk/printk.c
··· 383 383 /* 384 384 * Array of consoles built from command line options (console=) 385 385 */ 386 + 387 + #define MAX_CMDLINECONSOLES 8 388 + 386 389 static struct console_cmdline console_cmdline[MAX_CMDLINECONSOLES]; 387 390 388 391 static int preferred_console = -1; ··· 2503 2500 if (_braille_console_setup(&str, &brl_options)) 2504 2501 return 1; 2505 2502 2506 - /* Save the console for driver subsystem use */ 2507 - if (console_opt_save(str, brl_options)) 2508 - return 1; 2509 - 2510 - /* Flag register_console() to not call try_enable_default_console() */ 2511 - console_set_on_cmdline = 1; 2512 - 2513 - /* Don't attempt to parse a DEVNAME:0.0 style console */ 2514 - if (strchr(str, ':')) 2515 - return 1; 2516 - 2517 2503 /* 2518 2504 * Decode str into name, index, options. 2519 2505 */ ··· 2532 2540 return 1; 2533 2541 } 2534 2542 __setup("console=", console_setup); 2535 - 2536 - /* Only called from add_preferred_console_match() */ 2537 - int console_opt_add_preferred_console(const char *name, const short idx, 2538 - char *options, char *brl_options) 2539 - { 2540 - return __add_preferred_console(name, idx, options, brl_options, true); 2541 - } 2542 2543 2543 2544 /** 2544 2545 * add_preferred_console - add a device to the list of preferred consoles. ··· 3507 3522 * Note that a console with tty binding will have CON_CONSDEV 3508 3523 * flag set and will be first in the list. 3509 3524 */ 3510 - if (preferred_console < 0 && !console_set_on_cmdline) { 3525 + if (preferred_console < 0) { 3511 3526 if (hlist_empty(&console_list) || !console_first()->device || 3512 3527 console_first()->flags & CON_BOOT) { 3513 3528 try_enable_default_console(newcon);