diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-11-12 19:02:30 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-11-12 19:02:30 -0500 |
| commit | edaa4d668babd65e98e1452043996bbefc0285b0 (patch) | |
| tree | a6cf4c6083ae49e8d1b7a4efc92a32864a79e534 /drivers/serial | |
| parent | 891cbd30ef456664e50bbd28436ef3006a81cf7c (diff) | |
| parent | 40e3465db2cffd64e069ca82ee981025554bc159 (diff) | |
Merge branch 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
* 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6:
n_gsm: Fix length handling
n_gsm: Copy n2 over when configuring via ioctl interface
serial: bfin_5xx: grab port lock before making port termios changes
serial: bfin_5xx: disable CON_PRINTBUFFER for consoles
serial: bfin_5xx: remove redundant SSYNC to improve TX speed
serial: bfin_5xx: always include DMA headers
vcs: make proper usage of the poll flags
amiserial: Remove unused variable icount
8250: Fix tcsetattr to avoid ioctl(TIOCMIWAIT) hang
tty_ldisc: Fix BUG() on hangup
TTY: restore tty_ldisc_wait_idle
SERIAL: blacklist si3052 chip
drivers/serial/bfin_5xx.c: Fix line continuation defects
tty: prevent DOS in the flush_to_ldisc
8250: add support for Kouwell KW-L221N-2
nozomi: Fix warning from the previous TIOCGCOUNT changes
tty: fix warning in synclink driver
tty: Fix formatting in tty.h
tty: the development tree is now done in git
Diffstat (limited to 'drivers/serial')
| -rw-r--r-- | drivers/serial/8250.c | 5 | ||||
| -rw-r--r-- | drivers/serial/8250_pci.c | 5 | ||||
| -rw-r--r-- | drivers/serial/bfin_5xx.c | 31 |
3 files changed, 30 insertions, 11 deletions
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index 4d8e14b7aa93..dd5e1ac22251 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c | |||
| @@ -2343,8 +2343,11 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios, | |||
| 2343 | 2343 | ||
| 2344 | /* | 2344 | /* |
| 2345 | * CTS flow control flag and modem status interrupts | 2345 | * CTS flow control flag and modem status interrupts |
| 2346 | * Only disable MSI if no threads are waiting in | ||
| 2347 | * serial_core::uart_wait_modem_status | ||
| 2346 | */ | 2348 | */ |
| 2347 | up->ier &= ~UART_IER_MSI; | 2349 | if (!waitqueue_active(&up->port.state->port.delta_msr_wait)) |
| 2350 | up->ier &= ~UART_IER_MSI; | ||
| 2348 | if (!(up->bugs & UART_BUG_NOMSR) && | 2351 | if (!(up->bugs & UART_BUG_NOMSR) && |
| 2349 | UART_ENABLE_MS(&up->port, termios->c_cflag)) | 2352 | UART_ENABLE_MS(&up->port, termios->c_cflag)) |
| 2350 | up->ier |= UART_IER_MSI; | 2353 | up->ier |= UART_IER_MSI; |
diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c index 53be4d35a0aa..842e3b2a02b1 100644 --- a/drivers/serial/8250_pci.c +++ b/drivers/serial/8250_pci.c | |||
| @@ -2285,6 +2285,8 @@ static struct pciserial_board pci_boards[] __devinitdata = { | |||
| 2285 | 2285 | ||
| 2286 | static const struct pci_device_id softmodem_blacklist[] = { | 2286 | static const struct pci_device_id softmodem_blacklist[] = { |
| 2287 | { PCI_VDEVICE(AL, 0x5457), }, /* ALi Corporation M5457 AC'97 Modem */ | 2287 | { PCI_VDEVICE(AL, 0x5457), }, /* ALi Corporation M5457 AC'97 Modem */ |
| 2288 | { PCI_VDEVICE(MOTOROLA, 0x3052), }, /* Motorola Si3052-based modem */ | ||
| 2289 | { PCI_DEVICE(0x1543, 0x3052), }, /* Si3052-based modem, default IDs */ | ||
| 2288 | }; | 2290 | }; |
| 2289 | 2291 | ||
| 2290 | /* | 2292 | /* |
| @@ -2863,6 +2865,9 @@ static struct pci_device_id serial_pci_tbl[] = { | |||
| 2863 | PCI_SUBVENDOR_ID_SIIG, PCI_SUBDEVICE_ID_SIIG_QUARTET_SERIAL, | 2865 | PCI_SUBVENDOR_ID_SIIG, PCI_SUBDEVICE_ID_SIIG_QUARTET_SERIAL, |
| 2864 | 0, 0, | 2866 | 0, 0, |
| 2865 | pbn_b0_4_1152000 }, | 2867 | pbn_b0_4_1152000 }, |
| 2868 | { PCI_VENDOR_ID_OXSEMI, 0x9505, | ||
| 2869 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
| 2870 | pbn_b0_bt_2_921600 }, | ||
| 2866 | 2871 | ||
| 2867 | /* | 2872 | /* |
| 2868 | * The below card is a little controversial since it is the | 2873 | * The below card is a little controversial since it is the |
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c index a9eff2b18eab..19cac9f610fd 100644 --- a/drivers/serial/bfin_5xx.c +++ b/drivers/serial/bfin_5xx.c | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | #include <linux/tty.h> | 23 | #include <linux/tty.h> |
| 24 | #include <linux/tty_flip.h> | 24 | #include <linux/tty_flip.h> |
| 25 | #include <linux/serial_core.h> | 25 | #include <linux/serial_core.h> |
| 26 | #include <linux/dma-mapping.h> | ||
| 26 | 27 | ||
| 27 | #if defined(CONFIG_KGDB_SERIAL_CONSOLE) || \ | 28 | #if defined(CONFIG_KGDB_SERIAL_CONSOLE) || \ |
| 28 | defined(CONFIG_KGDB_SERIAL_CONSOLE_MODULE) | 29 | defined(CONFIG_KGDB_SERIAL_CONSOLE_MODULE) |
| @@ -33,12 +34,10 @@ | |||
| 33 | #include <asm/gpio.h> | 34 | #include <asm/gpio.h> |
| 34 | #include <mach/bfin_serial_5xx.h> | 35 | #include <mach/bfin_serial_5xx.h> |
| 35 | 36 | ||
| 36 | #ifdef CONFIG_SERIAL_BFIN_DMA | 37 | #include <asm/dma.h> |
| 37 | #include <linux/dma-mapping.h> | ||
| 38 | #include <asm/io.h> | 38 | #include <asm/io.h> |
| 39 | #include <asm/irq.h> | 39 | #include <asm/irq.h> |
| 40 | #include <asm/cacheflush.h> | 40 | #include <asm/cacheflush.h> |
| 41 | #endif | ||
| 42 | 41 | ||
| 43 | #ifdef CONFIG_SERIAL_BFIN_MODULE | 42 | #ifdef CONFIG_SERIAL_BFIN_MODULE |
| 44 | # undef CONFIG_EARLY_PRINTK | 43 | # undef CONFIG_EARLY_PRINTK |
| @@ -360,7 +359,6 @@ static void bfin_serial_tx_chars(struct bfin_serial_port *uart) | |||
| 360 | UART_PUT_CHAR(uart, xmit->buf[xmit->tail]); | 359 | UART_PUT_CHAR(uart, xmit->buf[xmit->tail]); |
| 361 | xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); | 360 | xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); |
| 362 | uart->port.icount.tx++; | 361 | uart->port.icount.tx++; |
| 363 | SSYNC(); | ||
| 364 | } | 362 | } |
| 365 | 363 | ||
| 366 | if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) | 364 | if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) |
| @@ -688,6 +686,13 @@ static int bfin_serial_startup(struct uart_port *port) | |||
| 688 | 686 | ||
| 689 | # ifdef CONFIG_BF54x | 687 | # ifdef CONFIG_BF54x |
| 690 | { | 688 | { |
| 689 | /* | ||
| 690 | * UART2 and UART3 on BF548 share interrupt PINs and DMA | ||
| 691 | * controllers with SPORT2 and SPORT3. UART rx and tx | ||
| 692 | * interrupts are generated in PIO mode only when configure | ||
| 693 | * their peripheral mapping registers properly, which means | ||
| 694 | * request corresponding DMA channels in PIO mode as well. | ||
| 695 | */ | ||
| 691 | unsigned uart_dma_ch_rx, uart_dma_ch_tx; | 696 | unsigned uart_dma_ch_rx, uart_dma_ch_tx; |
| 692 | 697 | ||
| 693 | switch (uart->port.irq) { | 698 | switch (uart->port.irq) { |
| @@ -734,8 +739,7 @@ static int bfin_serial_startup(struct uart_port *port) | |||
| 734 | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | | 739 | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | |
| 735 | IRQF_DISABLED, "BFIN_UART_CTS", uart)) { | 740 | IRQF_DISABLED, "BFIN_UART_CTS", uart)) { |
| 736 | uart->cts_pin = -1; | 741 | uart->cts_pin = -1; |
| 737 | pr_info("Unable to attach BlackFin UART CTS interrupt.\ | 742 | pr_info("Unable to attach BlackFin UART CTS interrupt. So, disable it.\n"); |
| 738 | So, disable it.\n"); | ||
| 739 | } | 743 | } |
| 740 | } | 744 | } |
| 741 | if (uart->rts_pin >= 0) { | 745 | if (uart->rts_pin >= 0) { |
| @@ -747,8 +751,7 @@ static int bfin_serial_startup(struct uart_port *port) | |||
| 747 | if (request_irq(uart->status_irq, | 751 | if (request_irq(uart->status_irq, |
| 748 | bfin_serial_mctrl_cts_int, | 752 | bfin_serial_mctrl_cts_int, |
| 749 | IRQF_DISABLED, "BFIN_UART_MODEM_STATUS", uart)) { | 753 | IRQF_DISABLED, "BFIN_UART_MODEM_STATUS", uart)) { |
| 750 | pr_info("Unable to attach BlackFin UART Modem \ | 754 | pr_info("Unable to attach BlackFin UART Modem Status interrupt.\n"); |
| 751 | Status interrupt.\n"); | ||
| 752 | } | 755 | } |
| 753 | 756 | ||
| 754 | /* CTS RTS PINs are negative assertive. */ | 757 | /* CTS RTS PINs are negative assertive. */ |
| @@ -846,6 +849,8 @@ bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios, | |||
| 846 | if (termios->c_cflag & CMSPAR) | 849 | if (termios->c_cflag & CMSPAR) |
| 847 | lcr |= STP; | 850 | lcr |= STP; |
| 848 | 851 | ||
| 852 | spin_lock_irqsave(&uart->port.lock, flags); | ||
| 853 | |||
| 849 | port->read_status_mask = OE; | 854 | port->read_status_mask = OE; |
| 850 | if (termios->c_iflag & INPCK) | 855 | if (termios->c_iflag & INPCK) |
| 851 | port->read_status_mask |= (FE | PE); | 856 | port->read_status_mask |= (FE | PE); |
| @@ -875,8 +880,6 @@ bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios, | |||
| 875 | if (termios->c_line != N_IRDA) | 880 | if (termios->c_line != N_IRDA) |
| 876 | quot -= ANOMALY_05000230; | 881 | quot -= ANOMALY_05000230; |
| 877 | 882 | ||
| 878 | spin_lock_irqsave(&uart->port.lock, flags); | ||
| 879 | |||
| 880 | UART_SET_ANOMALY_THRESHOLD(uart, USEC_PER_SEC / baud * 15); | 883 | UART_SET_ANOMALY_THRESHOLD(uart, USEC_PER_SEC / baud * 15); |
| 881 | 884 | ||
| 882 | /* Disable UART */ | 885 | /* Disable UART */ |
| @@ -1321,6 +1324,14 @@ struct console __init *bfin_earlyserial_init(unsigned int port, | |||
| 1321 | struct bfin_serial_port *uart; | 1324 | struct bfin_serial_port *uart; |
| 1322 | struct ktermios t; | 1325 | struct ktermios t; |
| 1323 | 1326 | ||
| 1327 | #ifdef CONFIG_SERIAL_BFIN_CONSOLE | ||
| 1328 | /* | ||
| 1329 | * If we are using early serial, don't let the normal console rewind | ||
| 1330 | * log buffer, since that causes things to be printed multiple times | ||
| 1331 | */ | ||
| 1332 | bfin_serial_console.flags &= ~CON_PRINTBUFFER; | ||
| 1333 | #endif | ||
| 1334 | |||
| 1324 | if (port == -1 || port >= nr_active_ports) | 1335 | if (port == -1 || port >= nr_active_ports) |
| 1325 | port = 0; | 1336 | port = 0; |
| 1326 | bfin_serial_init_ports(); | 1337 | bfin_serial_init_ports(); |
