LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [GIT PATCH] TTY/serial driver fixes for .38
@ 2011-02-10 20:15 Greg KH
2011-02-10 20:17 ` [PATCH 1/4] virtio: console: Move file back to drivers/char/ Greg Kroah-Hartman
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Greg KH @ 2011-02-10 20:15 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel
Here are a few tty and serial fixes for your .38 tree.
A file got moved back that shouldn't have been moved in the tty/hvc
renames, and a few other tiny bugfixes, nothing major.
Please pull from:
master.kernel.org:/pub/scm/linux/kernel/git/gregkh/tty-2.6.git/ tty-linus
All of these patches have been in the -mm and -next trees for the past
week or so.
Patches will be sent to the linux-kernel mailing list, if anyone wants
to see them.
thanks,
greg k-h
------------
arch/blackfin/include/asm/bfin_serial.h | 2 ++
drivers/char/Makefile | 1 +
drivers/{tty/hvc => char}/virtio_console.c | 2 +-
drivers/tty/hvc/Makefile | 1 -
drivers/tty/n_gsm.c | 1 +
drivers/tty/serial/68360serial.c | 1 +
drivers/tty/serial/bfin_5xx.c | 15 ++++++---------
7 files changed, 12 insertions(+), 11 deletions(-)
rename drivers/{tty/hvc => char}/virtio_console.c (99%)
---------------
Amit Shah (1):
virtio: console: Move file back to drivers/char/
Ben Hutchings (1):
68360serial: Plumb in rs_360_get_icount()
Ken Mills (1):
n_gsm: copy mtu over when configuring via ioctl interface
Sonic Zhang (1):
serial: bfin_5xx: split uart RX lock from uart port lock to avoid deadlock
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/4] virtio: console: Move file back to drivers/char/
2011-02-10 20:15 [GIT PATCH] TTY/serial driver fixes for .38 Greg KH
@ 2011-02-10 20:17 ` Greg Kroah-Hartman
2011-02-10 20:17 ` [PATCH 2/4] n_gsm: copy mtu over when configuring via ioctl interface Greg Kroah-Hartman
2011-02-10 20:17 ` [PATCH 4/4] serial: bfin_5xx: split uart RX lock from uart port lock to avoid deadlock Greg Kroah-Hartman
2 siblings, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2011-02-10 20:17 UTC (permalink / raw)
To: linux-kernel; +Cc: Amit Shah, Rusty Russell, Greg Kroah-Hartman
From: Amit Shah <amit.shah@redhat.com>
Commit 728674a7e466628df2aeec6d11a2ae1ef968fb67 moved virtio_console.c
to drivers/tty/hvc/ under the perception of this being an hvc driver.
It was such once, but these days it has generic communication
capabilities as well, so move it to drivers/char/.
In the future, the hvc part from this file can be split off and moved
under drivers/tty/hvc/.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
CC: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/char/Makefile | 1 +
drivers/{tty/hvc => char}/virtio_console.c | 2 +-
drivers/tty/hvc/Makefile | 1 -
3 files changed, 2 insertions(+), 2 deletions(-)
rename drivers/{tty/hvc => char}/virtio_console.c (99%)
diff --git a/drivers/char/Makefile b/drivers/char/Makefile
index 5bc765d..8238f89 100644
--- a/drivers/char/Makefile
+++ b/drivers/char/Makefile
@@ -30,6 +30,7 @@ obj-$(CONFIG_SYNCLINK_GT) += synclink_gt.o
obj-$(CONFIG_AMIGA_BUILTIN_SERIAL) += amiserial.o
obj-$(CONFIG_SX) += sx.o generic_serial.o
obj-$(CONFIG_RIO) += rio/ generic_serial.o
+obj-$(CONFIG_VIRTIO_CONSOLE) += virtio_console.o
obj-$(CONFIG_RAW_DRIVER) += raw.o
obj-$(CONFIG_SGI_SNSC) += snsc.o snsc_event.o
obj-$(CONFIG_MSPEC) += mspec.o
diff --git a/drivers/tty/hvc/virtio_console.c b/drivers/char/virtio_console.c
similarity index 99%
rename from drivers/tty/hvc/virtio_console.c
rename to drivers/char/virtio_console.c
index 896a2ce..5feadee 100644
--- a/drivers/tty/hvc/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -31,7 +31,7 @@
#include <linux/virtio_console.h>
#include <linux/wait.h>
#include <linux/workqueue.h>
-#include "hvc_console.h"
+#include "../tty/hvc/hvc_console.h"
/*
* 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 e6bed5f..d79e7e9 100644
--- a/drivers/tty/hvc/Makefile
+++ b/drivers/tty/hvc/Makefile
@@ -10,4 +10,3 @@ obj-$(CONFIG_HVC_XEN) += hvc_xen.o
obj-$(CONFIG_HVC_IUCV) += hvc_iucv.o
obj-$(CONFIG_HVC_UDBG) += hvc_udbg.o
obj-$(CONFIG_HVCS) += hvcs.o
-obj-$(CONFIG_VIRTIO_CONSOLE) += virtio_console.o
--
1.7.3.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/4] n_gsm: copy mtu over when configuring via ioctl interface
2011-02-10 20:15 [GIT PATCH] TTY/serial driver fixes for .38 Greg KH
2011-02-10 20:17 ` [PATCH 1/4] virtio: console: Move file back to drivers/char/ Greg Kroah-Hartman
@ 2011-02-10 20:17 ` Greg Kroah-Hartman
2011-02-10 20:17 ` [PATCH 4/4] serial: bfin_5xx: split uart RX lock from uart port lock to avoid deadlock Greg Kroah-Hartman
2 siblings, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2011-02-10 20:17 UTC (permalink / raw)
To: linux-kernel; +Cc: Ken Mills, Alan Cox, stable, Greg Kroah-Hartman
From: Ken Mills <ken.k.mills@intel.com>
This field is settable but did not get copied.
Signed-off-by: Ken Mills <ken.k.mills@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/tty/n_gsm.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index 44b8412..aa2e5d3 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,
gsm->initiator = c->initiator;
gsm->mru = c->mru;
+ gsm->mtu = c->mtu;
gsm->encoding = c->encapsulation;
gsm->adaption = c->adaption;
gsm->n2 = c->n2;
--
1.7.3.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 4/4] serial: bfin_5xx: split uart RX lock from uart port lock to avoid deadlock
2011-02-10 20:15 [GIT PATCH] TTY/serial driver fixes for .38 Greg KH
2011-02-10 20:17 ` [PATCH 1/4] virtio: console: Move file back to drivers/char/ Greg Kroah-Hartman
2011-02-10 20:17 ` [PATCH 2/4] n_gsm: copy mtu over when configuring via ioctl interface Greg Kroah-Hartman
@ 2011-02-10 20:17 ` Greg Kroah-Hartman
2 siblings, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2011-02-10 20:17 UTC (permalink / raw)
To: linux-kernel; +Cc: Sonic Zhang, Mike Frysinger, Greg Kroah-Hartman
From: Sonic Zhang <sonic.zhang@analog.com>
The RX lock is used to protect the RX buffer from concurrent access in DMA
mode between the timer and RX interrupt routines. It is independent from
the uart lock which is used to protect the TX buffer. It is possible for
a uart TX transfer to be started up from the RX interrupt handler if low
latency is enabled. So we need to split the locks to avoid deadlocking in
this situation.
In PIO mode, the RX lock is not necessary because the handle_simple_irq
and handle_level_irq functions ensure driver interrupt handlers are called
once on one core.
And now that the RX path has its own lock, the TX interrupt has nothing to
do with the RX path, so disabling it at the same time.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/blackfin/include/asm/bfin_serial.h | 2 ++
drivers/tty/serial/bfin_5xx.c | 15 ++++++---------
2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/arch/blackfin/include/asm/bfin_serial.h b/arch/blackfin/include/asm/bfin_serial.h
index 1ff9f14..7dbc664 100644
--- a/arch/blackfin/include/asm/bfin_serial.h
+++ b/arch/blackfin/include/asm/bfin_serial.h
@@ -10,6 +10,7 @@
#define __BFIN_ASM_SERIAL_H__
#include <linux/serial_core.h>
+#include <linux/spinlock.h>
#include <mach/anomaly.h>
#include <mach/bfin_serial.h>
@@ -41,6 +42,7 @@ struct bfin_serial_port {
struct circ_buf rx_dma_buf;
struct timer_list rx_dma_timer;
int rx_dma_nrows;
+ spinlock_t rx_lock;
unsigned int tx_dma_channel;
unsigned int rx_dma_channel;
struct work_struct tx_dma_workqueue;
diff --git a/drivers/tty/serial/bfin_5xx.c b/drivers/tty/serial/bfin_5xx.c
index e381b89..9b1ff2b 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)
{
struct bfin_serial_port *uart = dev_id;
- spin_lock(&uart->port.lock);
while (UART_GET_LSR(uart) & DR)
bfin_serial_rx_chars(uart);
- spin_unlock(&uart->port.lock);
return IRQ_HANDLED;
}
@@ -490,9 +488,8 @@ void bfin_serial_rx_dma_timeout(struct bfin_serial_port *uart)
{
int x_pos, pos;
- dma_disable_irq(uart->tx_dma_channel);
- dma_disable_irq(uart->rx_dma_channel);
- spin_lock_bh(&uart->port.lock);
+ dma_disable_irq_nosync(uart->rx_dma_channel);
+ spin_lock_bh(&uart->rx_lock);
/* 2D DMA RX buffer ring is used. Because curr_y_count and
* 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)
uart->rx_dma_buf.tail = uart->rx_dma_buf.head;
}
- spin_unlock_bh(&uart->port.lock);
- dma_enable_irq(uart->tx_dma_channel);
+ spin_unlock_bh(&uart->rx_lock);
dma_enable_irq(uart->rx_dma_channel);
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)
unsigned short irqstat;
int x_pos, pos;
- spin_lock(&uart->port.lock);
+ spin_lock(&uart->rx_lock);
irqstat = get_dma_curr_irqstat(uart->rx_dma_channel);
clear_dma_irqstat(uart->rx_dma_channel);
@@ -589,7 +585,7 @@ static irqreturn_t bfin_serial_dma_rx_int(int irq, void *dev_id)
uart->rx_dma_buf.tail = uart->rx_dma_buf.head;
}
- spin_unlock(&uart->port.lock);
+ spin_unlock(&uart->rx_lock);
return IRQ_HANDLED;
}
@@ -1332,6 +1328,7 @@ static int bfin_serial_probe(struct platform_device *pdev)
}
#ifdef CONFIG_SERIAL_BFIN_DMA
+ spin_lock_init(&uart->rx_lock);
uart->tx_done = 1;
uart->tx_count = 0;
--
1.7.3.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* [GIT PATCH] TTY/serial driver fixes for .38
@ 2011-01-31 16:28 Greg KH
0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2011-01-31 16:28 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel
Here are a few tty and serial fixes for your .38 tree.
Note, you will get a conflict in drivers/tty/tty_io.c with this pull, if
you like, I can provide a fixed up merge with this, but the fix should
be pretty easy to detect and fix up if you want to do it yourself.
There are a few bug fixes here that a number of people have reported,
and some build warning fixes as well.
Please pull from:
master.kernel.org:/pub/scm/linux/kernel/git/gregkh/tty-2.6.git/ tty-linus
All of these patches have been in the -mm and -next trees for the past
week or so.
Patches will be sent to the linux-kernel mailing list, if anyone wants
to see them.
thanks,
greg k-h
------------
drivers/tty/n_hdlc.c | 90 ++++++++++++++++++++++----------------------
drivers/tty/serial/8250.c | 3 +-
drivers/tty/serial/Kconfig | 1 +
drivers/tty/tty_io.c | 4 +-
drivers/tty/vt/vt.c | 11 ++++-
5 files changed, 58 insertions(+), 51 deletions(-)
---------------
Dave Airlie (1):
vt: fix issue when fbcon wants to takeover a second time.
Kay Sievers (1):
tty: use for_each_console() and WARN() on sysfs failures
Paul Fulghum (1):
n_hdlc: fix read and write locking
Pavel Machek (1):
serial: unbreak billionton CF card
Randy Dunlap (1):
tty/serial: fix apbuart build
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-02-10 20:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-10 20:15 [GIT PATCH] TTY/serial driver fixes for .38 Greg KH
2011-02-10 20:17 ` [PATCH 1/4] virtio: console: Move file back to drivers/char/ Greg Kroah-Hartman
2011-02-10 20:17 ` [PATCH 2/4] n_gsm: copy mtu over when configuring via ioctl interface Greg Kroah-Hartman
2011-02-10 20:17 ` [PATCH 4/4] serial: bfin_5xx: split uart RX lock from uart port lock to avoid deadlock Greg Kroah-Hartman
-- strict thread matches above, loose matches on Subject: below --
2011-01-31 16:28 [GIT PATCH] TTY/serial driver fixes for .38 Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).