diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-02-10 15:19:58 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-02-10 15:19:58 -0500 |
commit | ce86d35d2fd119d777fc72736732c8c9c3456698 (patch) | |
tree | 531b2077d9db6b44285ad75196672b4d102e8f20 /drivers | |
parent | b477958314796f51c54829dbaea89b1f46dabd06 (diff) | |
parent | 0f66e50af53d39edebf4bc64ef90077e738c171f (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:
serial: bfin_5xx: split uart RX lock from uart port lock to avoid deadlock
68360serial: Plumb in rs_360_get_icount()
n_gsm: copy mtu over when configuring via ioctl interface
virtio: console: Move file back to drivers/char/
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/Makefile | 1 | ||||
-rw-r--r-- | drivers/char/virtio_console.c (renamed from drivers/tty/hvc/virtio_console.c) | 2 | ||||
-rw-r--r-- | drivers/tty/hvc/Makefile | 1 | ||||
-rw-r--r-- | drivers/tty/n_gsm.c | 1 | ||||
-rw-r--r-- | drivers/tty/serial/68360serial.c | 1 | ||||
-rw-r--r-- | drivers/tty/serial/bfin_5xx.c | 15 |
6 files changed, 10 insertions, 11 deletions
diff --git a/drivers/char/Makefile b/drivers/char/Makefile index 5bc765d4c3c..8238f89f73c 100644 --- a/drivers/char/Makefile +++ b/drivers/char/Makefile | |||
@@ -30,6 +30,7 @@ obj-$(CONFIG_SYNCLINK_GT) += synclink_gt.o | |||
30 | obj-$(CONFIG_AMIGA_BUILTIN_SERIAL) += amiserial.o | 30 | obj-$(CONFIG_AMIGA_BUILTIN_SERIAL) += amiserial.o |
31 | obj-$(CONFIG_SX) += sx.o generic_serial.o | 31 | obj-$(CONFIG_SX) += sx.o generic_serial.o |
32 | obj-$(CONFIG_RIO) += rio/ generic_serial.o | 32 | obj-$(CONFIG_RIO) += rio/ generic_serial.o |
33 | obj-$(CONFIG_VIRTIO_CONSOLE) += virtio_console.o | ||
33 | obj-$(CONFIG_RAW_DRIVER) += raw.o | 34 | obj-$(CONFIG_RAW_DRIVER) += raw.o |
34 | obj-$(CONFIG_SGI_SNSC) += snsc.o snsc_event.o | 35 | obj-$(CONFIG_SGI_SNSC) += snsc.o snsc_event.o |
35 | obj-$(CONFIG_MSPEC) += mspec.o | 36 | obj-$(CONFIG_MSPEC) += mspec.o |
diff --git a/drivers/tty/hvc/virtio_console.c b/drivers/char/virtio_console.c index 239d86f9d56..49039318633 100644 --- a/drivers/tty/hvc/virtio_console.c +++ b/drivers/char/virtio_console.c | |||
@@ -32,7 +32,7 @@ | |||
32 | #include <linux/virtio_console.h> | 32 | #include <linux/virtio_console.h> |
33 | #include <linux/wait.h> | 33 | #include <linux/wait.h> |
34 | #include <linux/workqueue.h> | 34 | #include <linux/workqueue.h> |
35 | #include "hvc_console.h" | 35 | #include "../tty/hvc/hvc_console.h" |
36 | 36 | ||
37 | /* | 37 | /* |
38 | * This is a global struct for storing common data for all the devices | 38 | * This is a global struct for storing common data for all the devices |
diff --git a/drivers/tty/hvc/Makefile b/drivers/tty/hvc/Makefile index e6bed5f177f..d79e7e9bf9d 100644 --- a/drivers/tty/hvc/Makefile +++ b/drivers/tty/hvc/Makefile | |||
@@ -10,4 +10,3 @@ obj-$(CONFIG_HVC_XEN) += hvc_xen.o | |||
10 | obj-$(CONFIG_HVC_IUCV) += hvc_iucv.o | 10 | obj-$(CONFIG_HVC_IUCV) += hvc_iucv.o |
11 | obj-$(CONFIG_HVC_UDBG) += hvc_udbg.o | 11 | obj-$(CONFIG_HVC_UDBG) += hvc_udbg.o |
12 | obj-$(CONFIG_HVCS) += hvcs.o | 12 | obj-$(CONFIG_HVCS) += hvcs.o |
13 | obj-$(CONFIG_VIRTIO_CONSOLE) += virtio_console.o | ||
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index 44b8412a04e..aa2e5d3eb01 100644 --- a/drivers/tty/n_gsm.c +++ b/drivers/tty/n_gsm.c | |||
@@ -2414,6 +2414,7 @@ static int gsmld_config(struct tty_struct *tty, struct gsm_mux *gsm, | |||
2414 | 2414 | ||
2415 | gsm->initiator = c->initiator; | 2415 | gsm->initiator = c->initiator; |
2416 | gsm->mru = c->mru; | 2416 | gsm->mru = c->mru; |
2417 | gsm->mtu = c->mtu; | ||
2417 | gsm->encoding = c->encapsulation; | 2418 | gsm->encoding = c->encapsulation; |
2418 | gsm->adaption = c->adaption; | 2419 | gsm->adaption = c->adaption; |
2419 | gsm->n2 = c->n2; | 2420 | gsm->n2 = c->n2; |
diff --git a/drivers/tty/serial/68360serial.c b/drivers/tty/serial/68360serial.c index 88b13356ec1..bc21eeae8fd 100644 --- a/drivers/tty/serial/68360serial.c +++ b/drivers/tty/serial/68360serial.c | |||
@@ -2428,6 +2428,7 @@ static const struct tty_operations rs_360_ops = { | |||
2428 | /* .read_proc = rs_360_read_proc, */ | 2428 | /* .read_proc = rs_360_read_proc, */ |
2429 | .tiocmget = rs_360_tiocmget, | 2429 | .tiocmget = rs_360_tiocmget, |
2430 | .tiocmset = rs_360_tiocmset, | 2430 | .tiocmset = rs_360_tiocmset, |
2431 | .get_icount = rs_360_get_icount, | ||
2431 | }; | 2432 | }; |
2432 | 2433 | ||
2433 | static int __init rs_360_init(void) | 2434 | static int __init rs_360_init(void) |
diff --git a/drivers/tty/serial/bfin_5xx.c b/drivers/tty/serial/bfin_5xx.c index e381b895b04..9b1ff2b6bb3 100644 --- a/drivers/tty/serial/bfin_5xx.c +++ b/drivers/tty/serial/bfin_5xx.c | |||
@@ -370,10 +370,8 @@ static irqreturn_t bfin_serial_rx_int(int irq, void *dev_id) | |||
370 | { | 370 | { |
371 | struct bfin_serial_port *uart = dev_id; | 371 | struct bfin_serial_port *uart = dev_id; |
372 | 372 | ||
373 | spin_lock(&uart->port.lock); | ||
374 | while (UART_GET_LSR(uart) & DR) | 373 | while (UART_GET_LSR(uart) & DR) |
375 | bfin_serial_rx_chars(uart); | 374 | bfin_serial_rx_chars(uart); |
376 | spin_unlock(&uart->port.lock); | ||
377 | 375 | ||
378 | return IRQ_HANDLED; | 376 | return IRQ_HANDLED; |
379 | } | 377 | } |
@@ -490,9 +488,8 @@ void bfin_serial_rx_dma_timeout(struct bfin_serial_port *uart) | |||
490 | { | 488 | { |
491 | int x_pos, pos; | 489 | int x_pos, pos; |
492 | 490 | ||
493 | dma_disable_irq(uart->tx_dma_channel); | 491 | dma_disable_irq_nosync(uart->rx_dma_channel); |
494 | dma_disable_irq(uart->rx_dma_channel); | 492 | spin_lock_bh(&uart->rx_lock); |
495 | spin_lock_bh(&uart->port.lock); | ||
496 | 493 | ||
497 | /* 2D DMA RX buffer ring is used. Because curr_y_count and | 494 | /* 2D DMA RX buffer ring is used. Because curr_y_count and |
498 | * curr_x_count can't be read as an atomic operation, | 495 | * curr_x_count can't be read as an atomic operation, |
@@ -523,8 +520,7 @@ void bfin_serial_rx_dma_timeout(struct bfin_serial_port *uart) | |||
523 | uart->rx_dma_buf.tail = uart->rx_dma_buf.head; | 520 | uart->rx_dma_buf.tail = uart->rx_dma_buf.head; |
524 | } | 521 | } |
525 | 522 | ||
526 | spin_unlock_bh(&uart->port.lock); | 523 | spin_unlock_bh(&uart->rx_lock); |
527 | dma_enable_irq(uart->tx_dma_channel); | ||
528 | dma_enable_irq(uart->rx_dma_channel); | 524 | dma_enable_irq(uart->rx_dma_channel); |
529 | 525 | ||
530 | mod_timer(&(uart->rx_dma_timer), jiffies + DMA_RX_FLUSH_JIFFIES); | 526 | mod_timer(&(uart->rx_dma_timer), jiffies + DMA_RX_FLUSH_JIFFIES); |
@@ -571,7 +567,7 @@ static irqreturn_t bfin_serial_dma_rx_int(int irq, void *dev_id) | |||
571 | unsigned short irqstat; | 567 | unsigned short irqstat; |
572 | int x_pos, pos; | 568 | int x_pos, pos; |
573 | 569 | ||
574 | spin_lock(&uart->port.lock); | 570 | spin_lock(&uart->rx_lock); |
575 | irqstat = get_dma_curr_irqstat(uart->rx_dma_channel); | 571 | irqstat = get_dma_curr_irqstat(uart->rx_dma_channel); |
576 | clear_dma_irqstat(uart->rx_dma_channel); | 572 | clear_dma_irqstat(uart->rx_dma_channel); |
577 | 573 | ||
@@ -589,7 +585,7 @@ static irqreturn_t bfin_serial_dma_rx_int(int irq, void *dev_id) | |||
589 | uart->rx_dma_buf.tail = uart->rx_dma_buf.head; | 585 | uart->rx_dma_buf.tail = uart->rx_dma_buf.head; |
590 | } | 586 | } |
591 | 587 | ||
592 | spin_unlock(&uart->port.lock); | 588 | spin_unlock(&uart->rx_lock); |
593 | 589 | ||
594 | return IRQ_HANDLED; | 590 | return IRQ_HANDLED; |
595 | } | 591 | } |
@@ -1332,6 +1328,7 @@ static int bfin_serial_probe(struct platform_device *pdev) | |||
1332 | } | 1328 | } |
1333 | 1329 | ||
1334 | #ifdef CONFIG_SERIAL_BFIN_DMA | 1330 | #ifdef CONFIG_SERIAL_BFIN_DMA |
1331 | spin_lock_init(&uart->rx_lock); | ||
1335 | uart->tx_done = 1; | 1332 | uart->tx_done = 1; |
1336 | uart->tx_count = 0; | 1333 | uart->tx_count = 0; |
1337 | 1334 | ||