diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-01 13:50:58 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-01 13:50:58 -0400 |
commit | 974857266aae29c371ac2313ab520616335caec9 (patch) | |
tree | 9c2c67433a2783f29fe1f99cf44380b4fbb725af /drivers/tty | |
parent | 5ed0505c713805f89473cdc0bbfb5110dfd840cb (diff) | |
parent | 07961ac7c0ee8b546658717034fe692fd12eefa9 (diff) |
Merge v3.9-rc5 into char-misc-next
This picks up the fixes in 3.9-rc5 that we need here.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/8250/8250_core.c (renamed from drivers/tty/serial/8250/8250.c) | 6 | ||||
-rw-r--r-- | drivers/tty/serial/8250/8250_pci.c | 13 | ||||
-rw-r--r-- | drivers/tty/serial/8250/Kconfig | 17 | ||||
-rw-r--r-- | drivers/tty/serial/8250/Makefile | 8 | ||||
-rw-r--r-- | drivers/tty/serial/atmel_serial.c | 11 | ||||
-rw-r--r-- | drivers/tty/serial/xilinx_uartps.c | 2 | ||||
-rw-r--r-- | drivers/tty/vt/vc_screen.c | 6 |
7 files changed, 49 insertions, 14 deletions
diff --git a/drivers/tty/serial/8250/8250.c b/drivers/tty/serial/8250/8250_core.c index cf6a5383748a..35f9c96aada9 100644 --- a/drivers/tty/serial/8250/8250.c +++ b/drivers/tty/serial/8250/8250_core.c | |||
@@ -3418,6 +3418,7 @@ MODULE_PARM_DESC(probe_rsa, "Probe I/O ports for RSA"); | |||
3418 | #endif | 3418 | #endif |
3419 | MODULE_ALIAS_CHARDEV_MAJOR(TTY_MAJOR); | 3419 | MODULE_ALIAS_CHARDEV_MAJOR(TTY_MAJOR); |
3420 | 3420 | ||
3421 | #ifdef CONFIG_SERIAL_8250_DEPRECATED_OPTIONS | ||
3421 | #ifndef MODULE | 3422 | #ifndef MODULE |
3422 | /* This module was renamed to 8250_core in 3.7. Keep the old "8250" name | 3423 | /* This module was renamed to 8250_core in 3.7. Keep the old "8250" name |
3423 | * working as well for the module options so we don't break people. We | 3424 | * working as well for the module options so we don't break people. We |
@@ -3432,7 +3433,7 @@ MODULE_ALIAS_CHARDEV_MAJOR(TTY_MAJOR); | |||
3432 | static void __used s8250_options(void) | 3433 | static void __used s8250_options(void) |
3433 | { | 3434 | { |
3434 | #undef MODULE_PARAM_PREFIX | 3435 | #undef MODULE_PARAM_PREFIX |
3435 | #define MODULE_PARAM_PREFIX "8250." | 3436 | #define MODULE_PARAM_PREFIX "8250_core." |
3436 | 3437 | ||
3437 | module_param_cb(share_irqs, ¶m_ops_uint, &share_irqs, 0644); | 3438 | module_param_cb(share_irqs, ¶m_ops_uint, &share_irqs, 0644); |
3438 | module_param_cb(nr_uarts, ¶m_ops_uint, &nr_uarts, 0644); | 3439 | module_param_cb(nr_uarts, ¶m_ops_uint, &nr_uarts, 0644); |
@@ -3444,5 +3445,6 @@ static void __used s8250_options(void) | |||
3444 | #endif | 3445 | #endif |
3445 | } | 3446 | } |
3446 | #else | 3447 | #else |
3447 | MODULE_ALIAS("8250"); | 3448 | MODULE_ALIAS("8250_core"); |
3449 | #endif | ||
3448 | #endif | 3450 | #endif |
diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c index aa76825229dc..26e3a97ab157 100644 --- a/drivers/tty/serial/8250/8250_pci.c +++ b/drivers/tty/serial/8250/8250_pci.c | |||
@@ -1554,6 +1554,7 @@ pci_wch_ch353_setup(struct serial_private *priv, | |||
1554 | #define PCI_DEVICE_ID_PLX_CRONYX_OMEGA 0xc001 | 1554 | #define PCI_DEVICE_ID_PLX_CRONYX_OMEGA 0xc001 |
1555 | #define PCI_DEVICE_ID_INTEL_PATSBURG_KT 0x1d3d | 1555 | #define PCI_DEVICE_ID_INTEL_PATSBURG_KT 0x1d3d |
1556 | #define PCI_VENDOR_ID_WCH 0x4348 | 1556 | #define PCI_VENDOR_ID_WCH 0x4348 |
1557 | #define PCI_DEVICE_ID_WCH_CH352_2S 0x3253 | ||
1557 | #define PCI_DEVICE_ID_WCH_CH353_4S 0x3453 | 1558 | #define PCI_DEVICE_ID_WCH_CH353_4S 0x3453 |
1558 | #define PCI_DEVICE_ID_WCH_CH353_2S1PF 0x5046 | 1559 | #define PCI_DEVICE_ID_WCH_CH353_2S1PF 0x5046 |
1559 | #define PCI_DEVICE_ID_WCH_CH353_2S1P 0x7053 | 1560 | #define PCI_DEVICE_ID_WCH_CH353_2S1P 0x7053 |
@@ -2172,6 +2173,14 @@ static struct pci_serial_quirk pci_serial_quirks[] __refdata = { | |||
2172 | .subdevice = PCI_ANY_ID, | 2173 | .subdevice = PCI_ANY_ID, |
2173 | .setup = pci_wch_ch353_setup, | 2174 | .setup = pci_wch_ch353_setup, |
2174 | }, | 2175 | }, |
2176 | /* WCH CH352 2S card (16550 clone) */ | ||
2177 | { | ||
2178 | .vendor = PCI_VENDOR_ID_WCH, | ||
2179 | .device = PCI_DEVICE_ID_WCH_CH352_2S, | ||
2180 | .subvendor = PCI_ANY_ID, | ||
2181 | .subdevice = PCI_ANY_ID, | ||
2182 | .setup = pci_wch_ch353_setup, | ||
2183 | }, | ||
2175 | /* | 2184 | /* |
2176 | * ASIX devices with FIFO bug | 2185 | * ASIX devices with FIFO bug |
2177 | */ | 2186 | */ |
@@ -4870,6 +4879,10 @@ static struct pci_device_id serial_pci_tbl[] = { | |||
4870 | PCI_ANY_ID, PCI_ANY_ID, | 4879 | PCI_ANY_ID, PCI_ANY_ID, |
4871 | 0, 0, pbn_b0_bt_2_115200 }, | 4880 | 0, 0, pbn_b0_bt_2_115200 }, |
4872 | 4881 | ||
4882 | { PCI_VENDOR_ID_WCH, PCI_DEVICE_ID_WCH_CH352_2S, | ||
4883 | PCI_ANY_ID, PCI_ANY_ID, | ||
4884 | 0, 0, pbn_b0_bt_2_115200 }, | ||
4885 | |||
4873 | /* | 4886 | /* |
4874 | * Commtech, Inc. Fastcom adapters | 4887 | * Commtech, Inc. Fastcom adapters |
4875 | */ | 4888 | */ |
diff --git a/drivers/tty/serial/8250/Kconfig b/drivers/tty/serial/8250/Kconfig index 2ef9537bcb2c..80fe91e64a52 100644 --- a/drivers/tty/serial/8250/Kconfig +++ b/drivers/tty/serial/8250/Kconfig | |||
@@ -33,6 +33,23 @@ config SERIAL_8250 | |||
33 | Most people will say Y or M here, so that they can use serial mice, | 33 | Most people will say Y or M here, so that they can use serial mice, |
34 | modems and similar devices connecting to the standard serial ports. | 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 | config SERIAL_8250_PNP | 53 | config SERIAL_8250_PNP |
37 | bool "8250/16550 PNP device support" if EXPERT | 54 | bool "8250/16550 PNP device support" if EXPERT |
38 | depends on SERIAL_8250 && PNP | 55 | depends on SERIAL_8250 && PNP |
diff --git a/drivers/tty/serial/8250/Makefile b/drivers/tty/serial/8250/Makefile index a23838a4d535..36d68d054307 100644 --- a/drivers/tty/serial/8250/Makefile +++ b/drivers/tty/serial/8250/Makefile | |||
@@ -2,10 +2,10 @@ | |||
2 | # Makefile for the 8250 serial device drivers. | 2 | # Makefile for the 8250 serial device drivers. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-$(CONFIG_SERIAL_8250) += 8250_core.o | 5 | obj-$(CONFIG_SERIAL_8250) += 8250.o |
6 | 8250_core-y := 8250.o | 6 | 8250-y := 8250_core.o |
7 | 8250_core-$(CONFIG_SERIAL_8250_PNP) += 8250_pnp.o | 7 | 8250-$(CONFIG_SERIAL_8250_PNP) += 8250_pnp.o |
8 | 8250_core-$(CONFIG_SERIAL_8250_DMA) += 8250_dma.o | 8 | 8250-$(CONFIG_SERIAL_8250_DMA) += 8250_dma.o |
9 | obj-$(CONFIG_SERIAL_8250_GSC) += 8250_gsc.o | 9 | obj-$(CONFIG_SERIAL_8250_GSC) += 8250_gsc.o |
10 | obj-$(CONFIG_SERIAL_8250_PCI) += 8250_pci.o | 10 | obj-$(CONFIG_SERIAL_8250_PCI) += 8250_pci.o |
11 | obj-$(CONFIG_SERIAL_8250_HP300) += 8250_hp300.o | 11 | obj-$(CONFIG_SERIAL_8250_HP300) += 8250_hp300.o |
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c index d4a7c241b751..3467462869ce 100644 --- a/drivers/tty/serial/atmel_serial.c +++ b/drivers/tty/serial/atmel_serial.c | |||
@@ -158,7 +158,7 @@ struct atmel_uart_port { | |||
158 | }; | 158 | }; |
159 | 159 | ||
160 | static struct atmel_uart_port atmel_ports[ATMEL_MAX_UART]; | 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 | #ifdef SUPPORT_SYSRQ | 163 | #ifdef SUPPORT_SYSRQ |
164 | static struct console atmel_console; | 164 | static struct console atmel_console; |
@@ -1769,15 +1769,14 @@ static int atmel_serial_probe(struct platform_device *pdev) | |||
1769 | if (ret < 0) | 1769 | if (ret < 0) |
1770 | /* port id not found in platform data nor device-tree aliases: | 1770 | /* port id not found in platform data nor device-tree aliases: |
1771 | * auto-enumerate it */ | 1771 | * auto-enumerate it */ |
1772 | ret = find_first_zero_bit(&atmel_ports_in_use, | 1772 | ret = find_first_zero_bit(atmel_ports_in_use, ATMEL_MAX_UART); |
1773 | sizeof(atmel_ports_in_use)); | ||
1774 | 1773 | ||
1775 | if (ret > ATMEL_MAX_UART) { | 1774 | if (ret >= ATMEL_MAX_UART) { |
1776 | ret = -ENODEV; | 1775 | ret = -ENODEV; |
1777 | goto err; | 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 | /* port already in use */ | 1780 | /* port already in use */ |
1782 | ret = -EBUSY; | 1781 | ret = -EBUSY; |
1783 | goto err; | 1782 | goto err; |
@@ -1857,7 +1856,7 @@ static int atmel_serial_remove(struct platform_device *pdev) | |||
1857 | 1856 | ||
1858 | /* "port" is allocated statically, so we shouldn't free it */ | 1857 | /* "port" is allocated statically, so we shouldn't free it */ |
1859 | 1858 | ||
1860 | clear_bit(port->line, &atmel_ports_in_use); | 1859 | clear_bit(port->line, atmel_ports_in_use); |
1861 | 1860 | ||
1862 | clk_put(atmel_port->clk); | 1861 | clk_put(atmel_port->clk); |
1863 | 1862 | ||
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index ba451c7209fc..f36bbba1ac8b 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c | |||
@@ -578,6 +578,8 @@ static int xuartps_startup(struct uart_port *port) | |||
578 | /* Receive Timeout register is enabled with value of 10 */ | 578 | /* Receive Timeout register is enabled with value of 10 */ |
579 | xuartps_writel(10, XUARTPS_RXTOUT_OFFSET); | 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 | /* Set the Interrupt Registers with desired interrupts */ | 584 | /* Set the Interrupt Registers with desired interrupts */ |
583 | xuartps_writel(XUARTPS_IXR_TXEMPTY | XUARTPS_IXR_PARITY | | 585 | xuartps_writel(XUARTPS_IXR_TXEMPTY | XUARTPS_IXR_PARITY | |
diff --git a/drivers/tty/vt/vc_screen.c b/drivers/tty/vt/vc_screen.c index e4ca345873c3..d7799deacb21 100644 --- a/drivers/tty/vt/vc_screen.c +++ b/drivers/tty/vt/vc_screen.c | |||
@@ -93,7 +93,7 @@ vcs_poll_data_free(struct vcs_poll_data *poll) | |||
93 | static struct vcs_poll_data * | 93 | static struct vcs_poll_data * |
94 | vcs_poll_data_get(struct file *file) | 94 | vcs_poll_data_get(struct file *file) |
95 | { | 95 | { |
96 | struct vcs_poll_data *poll = file->private_data; | 96 | struct vcs_poll_data *poll = file->private_data, *kill = NULL; |
97 | 97 | ||
98 | if (poll) | 98 | if (poll) |
99 | return poll; | 99 | return poll; |
@@ -122,10 +122,12 @@ vcs_poll_data_get(struct file *file) | |||
122 | file->private_data = poll; | 122 | file->private_data = poll; |
123 | } else { | 123 | } else { |
124 | /* someone else raced ahead of us */ | 124 | /* someone else raced ahead of us */ |
125 | vcs_poll_data_free(poll); | 125 | kill = poll; |
126 | poll = file->private_data; | 126 | poll = file->private_data; |
127 | } | 127 | } |
128 | spin_unlock(&file->f_lock); | 128 | spin_unlock(&file->f_lock); |
129 | if (kill) | ||
130 | vcs_poll_data_free(kill); | ||
129 | 131 | ||
130 | return poll; | 132 | return poll; |
131 | } | 133 | } |