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

Pull TTY/serial fixes from Greg Kroah-Hartman:
"Here are some tty/serial driver fixes for 3.9.

The big thing here is the fix for the huge mess we caused renaming the
8250 driver accidentally in the 3.7 kernel release, without realizing
that there were users of the module options that suddenly broke. This
is now resolved, and, to top the injury off, we have a backwards-
compatible option for those users who got used to the new name since
3.7. Ugh, sorry about that.

Other than that, some other minor fixes for issues that have been
reported by users."

* tag 'tty-3.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
Xilinx: ARM: UART: clear pending irqs before enabling irqs
TTY: 8250, deprecated 8250_core.* options
TTY: 8250, revert module name change
serial: 8250_pci: Add WCH CH352 quirk to avoid Xscale detection
tty: atmel_serial_probe(): index of atmel_ports[] fix

+45 -12
+4 -2
drivers/tty/serial/8250/8250.c drivers/tty/serial/8250/8250_core.c
··· 3418 3418 #endif 3419 3419 MODULE_ALIAS_CHARDEV_MAJOR(TTY_MAJOR); 3420 3420 3421 + #ifdef CONFIG_SERIAL_8250_DEPRECATED_OPTIONS 3421 3422 #ifndef MODULE 3422 3423 /* This module was renamed to 8250_core in 3.7. Keep the old "8250" name 3423 3424 * working as well for the module options so we don't break people. We ··· 3433 3432 static void __used s8250_options(void) 3434 3433 { 3435 3434 #undef MODULE_PARAM_PREFIX 3436 - #define MODULE_PARAM_PREFIX "8250." 3435 + #define MODULE_PARAM_PREFIX "8250_core." 3437 3436 3438 3437 module_param_cb(share_irqs, &param_ops_uint, &share_irqs, 0644); 3439 3438 module_param_cb(nr_uarts, &param_ops_uint, &nr_uarts, 0644); ··· 3445 3444 #endif 3446 3445 } 3447 3446 #else 3448 - MODULE_ALIAS("8250"); 3447 + MODULE_ALIAS("8250_core"); 3448 + #endif 3449 3449 #endif
+13
drivers/tty/serial/8250/8250_pci.c
··· 1554 1554 #define PCI_DEVICE_ID_PLX_CRONYX_OMEGA 0xc001 1555 1555 #define PCI_DEVICE_ID_INTEL_PATSBURG_KT 0x1d3d 1556 1556 #define PCI_VENDOR_ID_WCH 0x4348 1557 + #define PCI_DEVICE_ID_WCH_CH352_2S 0x3253 1557 1558 #define PCI_DEVICE_ID_WCH_CH353_4S 0x3453 1558 1559 #define PCI_DEVICE_ID_WCH_CH353_2S1PF 0x5046 1559 1560 #define PCI_DEVICE_ID_WCH_CH353_2S1P 0x7053 ··· 2172 2171 .subvendor = PCI_ANY_ID, 2173 2172 .subdevice = PCI_ANY_ID, 2174 2173 .setup = pci_wch_ch353_setup, 2174 + }, 2175 + /* WCH CH352 2S card (16550 clone) */ 2176 + { 2177 + .vendor = PCI_VENDOR_ID_WCH, 2178 + .device = PCI_DEVICE_ID_WCH_CH352_2S, 2179 + .subvendor = PCI_ANY_ID, 2180 + .subdevice = PCI_ANY_ID, 2181 + .setup = pci_wch_ch353_setup, 2175 2182 }, 2176 2183 /* 2177 2184 * ASIX devices with FIFO bug ··· 4876 4867 0, 0, pbn_b0_bt_4_115200 }, 4877 4868 4878 4869 { PCI_VENDOR_ID_WCH, PCI_DEVICE_ID_WCH_CH353_2S1PF, 4870 + PCI_ANY_ID, PCI_ANY_ID, 4871 + 0, 0, pbn_b0_bt_2_115200 }, 4872 + 4873 + { PCI_VENDOR_ID_WCH, PCI_DEVICE_ID_WCH_CH352_2S, 4879 4874 PCI_ANY_ID, PCI_ANY_ID, 4880 4875 0, 0, pbn_b0_bt_2_115200 }, 4881 4876
+17
drivers/tty/serial/8250/Kconfig
··· 33 33 Most people will say Y or M here, so that they can use serial mice, 34 34 modems and similar devices connecting to the standard serial ports. 35 35 36 + config SERIAL_8250_DEPRECATED_OPTIONS 37 + bool "Support 8250_core.* kernel options (DEPRECATED)" 38 + depends on SERIAL_8250 39 + default y 40 + ---help--- 41 + In 3.7 we renamed 8250 to 8250_core by mistake, so now we have to 42 + accept kernel parameters in both forms like 8250_core.nr_uarts=4 and 43 + 8250.nr_uarts=4. We now renamed the module back to 8250, but if 44 + anybody noticed in 3.7 and changed their userspace we still have to 45 + keep the 8350_core.* options around until they revert the changes 46 + they already did. 47 + 48 + If 8250 is built as a module, this adds 8250_core alias instead. 49 + 50 + If you did not notice yet and/or you have userspace from pre-3.7, it 51 + is safe (and recommended) to say N here. 52 + 36 53 config SERIAL_8250_PNP 37 54 bool "8250/16550 PNP device support" if EXPERT 38 55 depends on SERIAL_8250 && PNP
+4 -4
drivers/tty/serial/8250/Makefile
··· 2 2 # Makefile for the 8250 serial device drivers. 3 3 # 4 4 5 - obj-$(CONFIG_SERIAL_8250) += 8250_core.o 6 - 8250_core-y := 8250.o 7 - 8250_core-$(CONFIG_SERIAL_8250_PNP) += 8250_pnp.o 8 - 8250_core-$(CONFIG_SERIAL_8250_DMA) += 8250_dma.o 5 + obj-$(CONFIG_SERIAL_8250) += 8250.o 6 + 8250-y := 8250_core.o 7 + 8250-$(CONFIG_SERIAL_8250_PNP) += 8250_pnp.o 8 + 8250-$(CONFIG_SERIAL_8250_DMA) += 8250_dma.o 9 9 obj-$(CONFIG_SERIAL_8250_GSC) += 8250_gsc.o 10 10 obj-$(CONFIG_SERIAL_8250_PCI) += 8250_pci.o 11 11 obj-$(CONFIG_SERIAL_8250_HP300) += 8250_hp300.o
+5 -6
drivers/tty/serial/atmel_serial.c
··· 158 158 }; 159 159 160 160 static struct atmel_uart_port atmel_ports[ATMEL_MAX_UART]; 161 - static unsigned long atmel_ports_in_use; 161 + static DECLARE_BITMAP(atmel_ports_in_use, ATMEL_MAX_UART); 162 162 163 163 #ifdef SUPPORT_SYSRQ 164 164 static struct console atmel_console; ··· 1769 1769 if (ret < 0) 1770 1770 /* port id not found in platform data nor device-tree aliases: 1771 1771 * auto-enumerate it */ 1772 - ret = find_first_zero_bit(&atmel_ports_in_use, 1773 - sizeof(atmel_ports_in_use)); 1772 + ret = find_first_zero_bit(atmel_ports_in_use, ATMEL_MAX_UART); 1774 1773 1775 - if (ret > ATMEL_MAX_UART) { 1774 + if (ret >= ATMEL_MAX_UART) { 1776 1775 ret = -ENODEV; 1777 1776 goto err; 1778 1777 } 1779 1778 1780 - if (test_and_set_bit(ret, &atmel_ports_in_use)) { 1779 + if (test_and_set_bit(ret, atmel_ports_in_use)) { 1781 1780 /* port already in use */ 1782 1781 ret = -EBUSY; 1783 1782 goto err; ··· 1856 1857 1857 1858 /* "port" is allocated statically, so we shouldn't free it */ 1858 1859 1859 - clear_bit(port->line, &atmel_ports_in_use); 1860 + clear_bit(port->line, atmel_ports_in_use); 1860 1861 1861 1862 clk_put(atmel_port->clk); 1862 1863
+2
drivers/tty/serial/xilinx_uartps.c
··· 578 578 /* Receive Timeout register is enabled with value of 10 */ 579 579 xuartps_writel(10, XUARTPS_RXTOUT_OFFSET); 580 580 581 + /* Clear out any pending interrupts before enabling them */ 582 + xuartps_writel(xuartps_readl(XUARTPS_ISR_OFFSET), XUARTPS_ISR_OFFSET); 581 583 582 584 /* Set the Interrupt Registers with desired interrupts */ 583 585 xuartps_writel(XUARTPS_IXR_TXEMPTY | XUARTPS_IXR_PARITY |