Commit 1b8b8596 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] callout removal: aurora

callout removal: aurora
parent acce73b9
...@@ -661,8 +661,7 @@ static void aurora_check_modem(struct Aurora_board const * bp, int chip) ...@@ -661,8 +661,7 @@ static void aurora_check_modem(struct Aurora_board const * bp, int chip)
if (mcr & MCR_CDCHG) { if (mcr & MCR_CDCHG) {
if (sbus_readb(&bp->r[chip]->r[CD180_MSVR]) & MSVR_CD) if (sbus_readb(&bp->r[chip]->r[CD180_MSVR]) & MSVR_CD)
wake_up_interruptible(&port->open_wait); wake_up_interruptible(&port->open_wait);
else if (!((port->flags & ASYNC_CALLOUT_ACTIVE) && else
(port->flags & ASYNC_CALLOUT_NOHUP)))
schedule_task(&port->tqueue_hangup); schedule_task(&port->tqueue_hangup);
} }
...@@ -1334,19 +1333,12 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp, ...@@ -1334,19 +1333,12 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
*/ */
if ((filp->f_flags & O_NONBLOCK) || if ((filp->f_flags & O_NONBLOCK) ||
(tty->flags & (1 << TTY_IO_ERROR))) { (tty->flags & (1 << TTY_IO_ERROR))) {
if (port->flags & ASYNC_CALLOUT_ACTIVE)
return -EBUSY;
port->flags |= ASYNC_NORMAL_ACTIVE; port->flags |= ASYNC_NORMAL_ACTIVE;
return 0; return 0;
} }
if (port->flags & ASYNC_CALLOUT_ACTIVE) {
if (port->normal_termios.c_cflag & CLOCAL)
do_clocal = 1;
} else {
if (C_CLOCAL(tty)) if (C_CLOCAL(tty))
do_clocal = 1; do_clocal = 1;
}
/* Block waiting for the carrier detect and the line to become /* Block waiting for the carrier detect and the line to become
* free (i.e., not in use by the callout). While we are in * free (i.e., not in use by the callout). While we are in
...@@ -1367,13 +1359,10 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp, ...@@ -1367,13 +1359,10 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
&bp->r[chip]->r[CD180_CAR]); &bp->r[chip]->r[CD180_CAR]);
udelay(1); udelay(1);
CD = sbus_readb(&bp->r[chip]->r[CD180_MSVR]) & MSVR_CD; CD = sbus_readb(&bp->r[chip]->r[CD180_MSVR]) & MSVR_CD;
if (!(port->flags & ASYNC_CALLOUT_ACTIVE)) {
port->MSVR=bp->RTS; port->MSVR=bp->RTS;
/* auto drops DTR */ /* auto drops DTR */
sbus_writeb(port->MSVR, sbus_writeb(port->MSVR, &bp->r[chip]->r[CD180_MSVR]);
&bp->r[chip]->r[CD180_MSVR]);
}
sti(); sti();
set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_INTERRUPTIBLE);
if (tty_hung_up_p(filp) || if (tty_hung_up_p(filp) ||
...@@ -1384,8 +1373,7 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp, ...@@ -1384,8 +1373,7 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
retval = -ERESTARTSYS; retval = -ERESTARTSYS;
break; break;
} }
if (/*!(port->flags & ASYNC_CALLOUT_ACTIVE) &&*/ if (!(port->flags & ASYNC_CLOSING) &&
!(port->flags & ASYNC_CLOSING) &&
(do_clocal || CD)) (do_clocal || CD))
break; break;
if (signal_pending(current)) { if (signal_pending(current)) {
...@@ -1465,8 +1453,6 @@ static int aurora_open(struct tty_struct * tty, struct file * filp) ...@@ -1465,8 +1453,6 @@ static int aurora_open(struct tty_struct * tty, struct file * filp)
restore_flags(flags); restore_flags(flags);
} }
port->session = current->session;
port->pgrp = current->pgrp;
#ifdef AURORA_DEBUG #ifdef AURORA_DEBUG
printk("aurora_open: end\n"); printk("aurora_open: end\n");
#endif #endif
...@@ -1520,8 +1506,6 @@ static void aurora_close(struct tty_struct * tty, struct file * filp) ...@@ -1520,8 +1506,6 @@ static void aurora_close(struct tty_struct * tty, struct file * filp)
*/ */
if (port->flags & ASYNC_NORMAL_ACTIVE) if (port->flags & ASYNC_NORMAL_ACTIVE)
port->normal_termios = *tty->termios; port->normal_termios = *tty->termios;
/* if (port->flags & ASYNC_CALLOUT_ACTIVE)
port->callout_termios = *tty->termios;*/
/* Now we wait for the transmit buffer to clear; and we notify /* Now we wait for the transmit buffer to clear; and we notify
* the line discipline to only process XON/XOFF characters. * the line discipline to only process XON/XOFF characters.
...@@ -1578,8 +1562,7 @@ static void aurora_close(struct tty_struct * tty, struct file * filp) ...@@ -1578,8 +1562,7 @@ static void aurora_close(struct tty_struct * tty, struct file * filp)
} }
wake_up_interruptible(&port->open_wait); wake_up_interruptible(&port->open_wait);
} }
port->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CALLOUT_ACTIVE| port->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING);
ASYNC_CLOSING);
wake_up_interruptible(&port->close_wait); wake_up_interruptible(&port->close_wait);
restore_flags(flags); restore_flags(flags);
#ifdef AURORA_DEBUG #ifdef AURORA_DEBUG
...@@ -2223,7 +2206,7 @@ static void aurora_hangup(struct tty_struct * tty) ...@@ -2223,7 +2206,7 @@ static void aurora_hangup(struct tty_struct * tty)
aurora_shutdown_port(bp, port); aurora_shutdown_port(bp, port);
port->event = 0; port->event = 0;
port->count = 0; port->count = 0;
port->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CALLOUT_ACTIVE); port->flags &= ~ASYNC_NORMAL_ACTIVE;
port->tty = 0; port->tty = 0;
wake_up_interruptible(&port->open_wait); wake_up_interruptible(&port->open_wait);
#ifdef AURORA_DEBUG #ifdef AURORA_DEBUG
......
...@@ -247,8 +247,6 @@ struct Aurora_port { ...@@ -247,8 +247,6 @@ struct Aurora_port {
long event; long event;
int timeout; int timeout;
int close_delay; int close_delay;
long session;
long pgrp;
unsigned char * xmit_buf; unsigned char * xmit_buf;
int custom_divisor; int custom_divisor;
int xmit_head; int xmit_head;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment