* [PATCH 1/4] Char: mxser_new, remove unused stuff
@ 2006-12-28 13:16 Jiri Slaby
2006-12-28 13:16 ` [PATCH 2/4] Char: mxser, obsolete old, nonexperimental new Jiri Slaby
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jiri Slaby @ 2006-12-28 13:16 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
mxser_new, remove unused stuff
- nobody waits on close_wait
- ASYNC_SPLIT_TERMIOS is not set by anybody, so do not test this flag
- process session and pgrp are useless information
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
commit 8fc2346d2eab1a1780c319ddd77d818a270aba02
tree 2e3a0a3726166385ab6aa5a10187ce4bc0594b89
parent 45dc5568e87fb6ce405b57e18cc0eb4a98da073c
author Jiri Slaby <jirislaby@gmail.com> Sat, 23 Dec 2006 01:45:14 +0059
committer Jiri Slaby <jirislaby@gmail.com> Thu, 28 Dec 2006 13:48:49 +0059
drivers/char/mxser_new.c | 18 ------------------
1 files changed, 0 insertions(+), 18 deletions(-)
diff --git a/drivers/char/mxser_new.c b/drivers/char/mxser_new.c
index 13b9072..4d4721e 100644
--- a/drivers/char/mxser_new.c
+++ b/drivers/char/mxser_new.c
@@ -237,8 +237,6 @@ struct mxser_port {
long realbaud;
int type; /* UART type */
int flags; /* defined in tty.h */
- long session; /* Session of opening process */
- long pgrp; /* pgrp of opening process */
int x_char; /* xon/xoff character */
int IER; /* Interrupt Enable Register */
@@ -267,14 +265,12 @@ struct mxser_port {
int xmit_cnt;
struct ktermios normal_termios;
- struct ktermios callout_termios;
struct mxser_mon mon_data;
spinlock_t slock;
struct work_struct tqueue;
wait_queue_head_t open_wait;
- wait_queue_head_t close_wait;
wait_queue_head_t delta_msr_wait;
};
@@ -936,17 +932,6 @@ static int mxser_open(struct tty_struct *tty, struct file *filp)
if (retval)
return retval;
- if ((info->count == 1) && (info->flags & ASYNC_SPLIT_TERMIOS)) {
- if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
- *tty->termios = info->normal_termios;
- else
- *tty->termios = info->callout_termios;
- mxser_change_speed(info, NULL);
- }
-
- info->session = process_session(current);
- info->pgrp = process_group(current);
-
/* unmark here for very high baud rate (ex. 921600 bps) used */
tty->low_latency = 1;
return 0;
@@ -1053,8 +1038,6 @@ static void mxser_close(struct tty_struct *tty, struct file *filp)
}
info->flags &= ~(ASYNC_NORMAL_ACTIVE | ASYNC_CLOSING);
- wake_up_interruptible(&info->close_wait);
-
}
static int mxser_write(struct tty_struct *tty, const unsigned char *buf, int count)
@@ -2420,7 +2403,6 @@ static int __devinit mxser_initbrd(struct mxser_board *brd,
INIT_WORK(&info->tqueue, mxser_do_softint);
info->normal_termios = mxvar_sdriver->init_termios;
init_waitqueue_head(&info->open_wait);
- init_waitqueue_head(&info->close_wait);
init_waitqueue_head(&info->delta_msr_wait);
memset(&info->mon_data, 0, sizeof(struct mxser_mon));
info->err_shadow = 0;
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 2/4] Char: mxser, obsolete old, nonexperimental new
2006-12-28 13:16 [PATCH 1/4] Char: mxser_new, remove unused stuff Jiri Slaby
@ 2006-12-28 13:16 ` Jiri Slaby
2006-12-28 13:16 ` [PATCH 3/4] Char: mxser_new, remove tty_wakeup bottomhalf Jiri Slaby
2006-12-28 13:17 ` [PATCH 4/4] Char: mxser_new, clean request_irq call Jiri Slaby
2 siblings, 0 replies; 4+ messages in thread
From: Jiri Slaby @ 2006-12-28 13:16 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
mxser, obsolete old, nonexperimental new
Mark v 1.x as obsolete and v 2.x as non-experimental in Kconfig.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
commit ce3d140accc090dee75676a4db2b1ddf7b39843e
tree a4322efa3ce3a55abd76340d769ec8e365a43b38
parent 8fc2346d2eab1a1780c319ddd77d818a270aba02
author Jiri Slaby <jirislaby@gmail.com> Sat, 23 Dec 2006 02:15:32 +0059
committer Jiri Slaby <jirislaby@gmail.com> Thu, 28 Dec 2006 13:48:56 +0059
drivers/char/Kconfig | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
index 5a8974c..5841b77 100644
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -191,7 +191,7 @@ config MOXA_INTELLIO
module will be called moxa.
config MOXA_SMARTIO
- tristate "Moxa SmartIO support"
+ tristate "Moxa SmartIO support (OBSOLETE)"
depends on SERIAL_NONSTANDARD
help
Say Y here if you have a Moxa SmartIO multiport serial card.
@@ -202,7 +202,7 @@ config MOXA_SMARTIO
here.
config MOXA_SMARTIO_NEW
- tristate "Moxa SmartIO support v. 2.0 (EXPERIMENTAL)"
+ tristate "Moxa SmartIO support v. 2.0"
depends on SERIAL_NONSTANDARD && (PCI || EISA || ISA)
help
Say Y here if you have a Moxa SmartIO multiport serial card and/or
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/4] Char: mxser_new, remove tty_wakeup bottomhalf
2006-12-28 13:16 [PATCH 1/4] Char: mxser_new, remove unused stuff Jiri Slaby
2006-12-28 13:16 ` [PATCH 2/4] Char: mxser, obsolete old, nonexperimental new Jiri Slaby
@ 2006-12-28 13:16 ` Jiri Slaby
2006-12-28 13:17 ` [PATCH 4/4] Char: mxser_new, clean request_irq call Jiri Slaby
2 siblings, 0 replies; 4+ messages in thread
From: Jiri Slaby @ 2006-12-28 13:16 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
mxser_new, remove tty_wakeup bottomhalf
It's safe to call tty_wakeup from irq context. Do not schedule it for later
calling.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
commit ec5dee09bf3e78d886d61168625e63280c715739
tree ec09e7afa162b4901d4304d89e588a12df77e494
parent ce3d140accc090dee75676a4db2b1ddf7b39843e
author Jiri Slaby <jirislaby@gmail.com> Thu, 28 Dec 2006 14:09:47 +0059
committer Jiri Slaby <jirislaby@gmail.com> Thu, 28 Dec 2006 14:09:47 +0059
drivers/char/.mxser_new.c.swp | Bin
drivers/char/mxser_new.c | 26 ++++++--------------------
2 files changed, 6 insertions(+), 20 deletions(-)
diff --git a/drivers/char/mxser_new.c b/drivers/char/mxser_new.c
index 4d4721e..420d23f 100644
--- a/drivers/char/mxser_new.c
+++ b/drivers/char/mxser_new.c
@@ -269,7 +269,6 @@ struct mxser_port {
struct mxser_mon mon_data;
spinlock_t slock;
- struct work_struct tqueue;
wait_queue_head_t open_wait;
wait_queue_head_t delta_msr_wait;
};
@@ -355,15 +354,6 @@ static void process_txrx_fifo(struct mxser_port *info)
}
}
-static void mxser_do_softint(struct work_struct *work)
-{
- struct mxser_port *info = container_of(work, struct mxser_port, tqueue);
- struct tty_struct *tty = info->tty;
-
- if (test_and_clear_bit(MXSER_EVENT_TXLOW, &info->event))
- tty_wakeup(tty);
-}
-
static unsigned char mxser_get_msr(int baseaddr, int mode, int port)
{
unsigned char status = 0;
@@ -607,8 +597,8 @@ static int mxser_change_speed(struct mxser_port *info,
outb(info->IER, info->ioaddr +
UART_IER);
}
- set_bit(MXSER_EVENT_TXLOW, &info->event);
- schedule_work(&info->tqueue); }
+ tty_wakeup(info->tty);
+ }
} else {
if (!(status & UART_MSR_CTS)) {
info->tty->hw_stopped = 1;
@@ -703,7 +693,6 @@ static void mxser_check_modem_status(struct mxser_port *port, int status)
if ((port->flags & ASYNC_CHECK_CD) && (status & UART_MSR_DDCD)) {
if (status & UART_MSR_DCD)
wake_up_interruptible(&port->open_wait);
- schedule_work(&port->tqueue);
}
if (port->flags & ASYNC_CTS_FLOW) {
@@ -719,8 +708,7 @@ static void mxser_check_modem_status(struct mxser_port *port, int status)
outb(port->IER, port->ioaddr +
UART_IER);
}
- set_bit(MXSER_EVENT_TXLOW, &port->event);
- schedule_work(&port->tqueue);
+ tty_wakeup(port->tty);
}
} else {
if (!(status & UART_MSR_CTS)) {
@@ -2220,10 +2208,9 @@ static void mxser_transmit_chars(struct mxser_port *port)
port->mon_data.up_txcnt += (cnt - port->xmit_cnt);
port->icount.tx += (cnt - port->xmit_cnt);
- if (port->xmit_cnt < WAKEUP_CHARS) {
- set_bit(MXSER_EVENT_TXLOW, &port->event);
- schedule_work(&port->tqueue);
- }
+ if (port->xmit_cnt < WAKEUP_CHARS)
+ tty_wakeup(port->tty);
+
if (port->xmit_cnt <= 0) {
port->IER &= ~UART_IER_THRI;
outb(port->IER, port->ioaddr + UART_IER);
@@ -2400,7 +2387,6 @@ static int __devinit mxser_initbrd(struct mxser_board *brd,
info->custom_divisor = info->baud_base * 16;
info->close_delay = 5 * HZ / 10;
info->closing_wait = 30 * HZ;
- INIT_WORK(&info->tqueue, mxser_do_softint);
info->normal_termios = mxvar_sdriver->init_termios;
init_waitqueue_head(&info->open_wait);
init_waitqueue_head(&info->delta_msr_wait);
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 4/4] Char: mxser_new, clean request_irq call
2006-12-28 13:16 [PATCH 1/4] Char: mxser_new, remove unused stuff Jiri Slaby
2006-12-28 13:16 ` [PATCH 2/4] Char: mxser, obsolete old, nonexperimental new Jiri Slaby
2006-12-28 13:16 ` [PATCH 3/4] Char: mxser_new, remove tty_wakeup bottomhalf Jiri Slaby
@ 2006-12-28 13:17 ` Jiri Slaby
2 siblings, 0 replies; 4+ messages in thread
From: Jiri Slaby @ 2006-12-28 13:17 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
mxser_new, clean request_irq call
We always set ASYNC_SHARE_IRQ, so do not test against this flag and request
shared irq directly. Also remove nonsense comment.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
commit ab35af25a3d01f1e07fc8de5b96f484b93a8ad2a
tree 3a79b6dba3253393371decb0c2cdd97c85580630
parent ec5dee09bf3e78d886d61168625e63280c715739
author Jiri Slaby <jirislaby@gmail.com> Thu, 28 Dec 2006 14:11:56 +0059
committer Jiri Slaby <jirislaby@gmail.com> Thu, 28 Dec 2006 14:11:56 +0059
drivers/char/.mxser_new.c.swp | Bin
drivers/char/mxser_new.c | 8 ++------
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/char/mxser_new.c b/drivers/char/mxser_new.c
index 420d23f..8da8833 100644
--- a/drivers/char/mxser_new.c
+++ b/drivers/char/mxser_new.c
@@ -2398,13 +2398,9 @@ static int __devinit mxser_initbrd(struct mxser_board *brd,
outb(inb(info->ioaddr + UART_IER) & 0xf0,
info->ioaddr + UART_IER);
}
- /*
- * Allocate the IRQ if necessary
- */
- retval = request_irq(brd->irq, mxser_interrupt,
- (brd->ports[0].flags & ASYNC_SHARE_IRQ) ? IRQF_SHARED :
- IRQF_DISABLED, "mxser", brd);
+ retval = request_irq(brd->irq, mxser_interrupt, IRQF_SHARED, "mxser",
+ brd);
if (retval) {
printk(KERN_ERR "Board %s: Request irq failed, IRQ (%d) may "
"conflict with another device.\n",
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-12-28 13:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-28 13:16 [PATCH 1/4] Char: mxser_new, remove unused stuff Jiri Slaby
2006-12-28 13:16 ` [PATCH 2/4] Char: mxser, obsolete old, nonexperimental new Jiri Slaby
2006-12-28 13:16 ` [PATCH 3/4] Char: mxser_new, remove tty_wakeup bottomhalf Jiri Slaby
2006-12-28 13:17 ` [PATCH 4/4] Char: mxser_new, clean request_irq call Jiri Slaby
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox