git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.3
[linux-2.6.git]
/
drivers
/
net
/
wan
/
sdla_chdlc.c
diff --git
a/drivers/net/wan/sdla_chdlc.c
b/drivers/net/wan/sdla_chdlc.c
index
b00fb78
..
e66c250
100644
(file)
--- a/
drivers/net/wan/sdla_chdlc.c
+++ b/
drivers/net/wan/sdla_chdlc.c
@@
-3628,11
+3628,7
@@
static void tty_poll_work (void* data)
if ((tty=card->tty)==NULL)
return;
if ((tty=card->tty)==NULL)
return;
- if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
- tty->ldisc.write_wakeup){
- (tty->ldisc.write_wakeup)(tty);
- }
- wake_up_interruptible(&tty->write_wait);
+ tty_wakeup(tty);
#if defined(SERIAL_HAVE_POLL_WAIT)
wake_up_interruptible(&tty->poll_wait);
#endif
#if defined(SERIAL_HAVE_POLL_WAIT)
wake_up_interruptible(&tty->poll_wait);
#endif
@@
-3857,6
+3853,7
@@
static void wanpipe_tty_receive(sdla_t *card, unsigned addr, unsigned int len)
char fp=0;
struct tty_struct *tty;
int i;
char fp=0;
struct tty_struct *tty;
int i;
+ struct tty_ldisc *ld;
if (!card->tty_open){
dbg_printk(KERN_INFO "%s: TTY not open during receive\n",
if (!card->tty_open){
dbg_printk(KERN_INFO "%s: TTY not open during receive\n",
@@
-3944,8
+3941,11
@@
static void wanpipe_tty_receive(sdla_t *card, unsigned addr, unsigned int len)
len -= offset;
}
sdla_peek(&card->hw, addr, card->tty_rx+offset, len);
len -= offset;
}
sdla_peek(&card->hw, addr, card->tty_rx+offset, len);
- if (tty->ldisc.receive_buf){
- tty->ldisc.receive_buf(tty,card->tty_rx,&fp,olen);
+ ld = tty_ldisc_ref(tty);
+ if (ld) {
+ if (ld->receive_buf)
+ ld->receive_buf(tty,card->tty_rx,&fp,olen);
+ tty_ldisc_deref(ld);
}else{
if (net_ratelimit()){
printk(KERN_INFO
}else{
if (net_ratelimit()){
printk(KERN_INFO
@@
-4252,14
+4252,10
@@
static void wanpipe_tty_flush_buffer(struct tty_struct *tty)
if (!tty)
return;
if (!tty)
return;
- wake_up_interruptible(&tty->write_wait);
#if defined(SERIAL_HAVE_POLL_WAIT)
wake_up_interruptible(&tty->poll_wait);
#endif
#if defined(SERIAL_HAVE_POLL_WAIT)
wake_up_interruptible(&tty->poll_wait);
#endif
- if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
- tty->ldisc.write_wakeup)
- (tty->ldisc.write_wakeup)(tty);
-
+ tty_wakeup(tty);
return;
}
return;
}