cleanup: remove pppoe_ioctl() declaration.
[safe/jmp/linux-2.6] / drivers / net / ppp_synctty.c
index aa3d39f..52938da 100644 (file)
@@ -44,6 +44,7 @@
 #include <linux/spinlock.h>
 #include <linux/completion.h>
 #include <linux/init.h>
+#include <linux/slab.h>
 #include <asm/uaccess.h>
 
 #define PPP_VERSION    "2.4.2"
@@ -378,10 +379,7 @@ ppp_sync_poll(struct tty_struct *tty, struct file *file, poll_table *wait)
        return 0;
 }
 
-/*
- * This can now be called from hard interrupt level as well
- * as soft interrupt level or mainline.
- */
+/* May sleep, don't call from interrupt level or with interrupts disabled */
 static void
 ppp_sync_receive(struct tty_struct *tty, const unsigned char *buf,
                  char *cflags, int count)
@@ -397,6 +395,7 @@ ppp_sync_receive(struct tty_struct *tty, const unsigned char *buf,
        if (!skb_queue_empty(&ap->rqueue))
                tasklet_schedule(&ap->tsk);
        sp_put(ap);
+       tty_unthrottle(tty);
 }
 
 static void
@@ -664,8 +663,8 @@ ppp_sync_push(struct syncppp *ap)
                }
                /* haven't made any progress */
                spin_unlock_bh(&ap->xmit_lock);
-               if (!(test_bit(XMIT_WAKEUP, &ap->xmit_flags)
-                     || (!tty_stuffed && ap->tpkt)))
+               if (!(test_bit(XMIT_WAKEUP, &ap->xmit_flags) ||
+                     (!tty_stuffed && ap->tpkt)))
                        break;
                if (!spin_trylock_bh(&ap->xmit_lock))
                        break;