* PPP driver, written by Michael Callahan and Al Longyear, and
* subsequently hacked by Paul Mackerras.
*
- * ==FILEVERSION 20041108==
+ * ==FILEVERSION 20020217==
*/
#include <linux/config.h>
ret = 0;
if (pf->dead)
break;
- if (pf->kind == INTERFACE) {
- /*
- * Return 0 (EOF) on an interface that has no
- * channels connected, unless it is looping
- * network traffic (demand mode).
- */
- struct ppp *ppp = PF_TO_PPP(pf);
- if (ppp->n_channels == 0
- && (ppp->flags & SC_LOOP_TRAFFIC) == 0)
- break;
- }
ret = -EAGAIN;
if (file->f_flags & O_NONBLOCK)
break;
mask |= POLLIN | POLLRDNORM;
if (pf->dead)
mask |= POLLHUP;
- else if (pf->kind == INTERFACE) {
- /* see comment in ppp_read */
- struct ppp *ppp = PF_TO_PPP(pf);
- if (ppp->n_channels == 0
- && (ppp->flags & SC_LOOP_TRAFFIC) == 0)
- mask |= POLLIN | POLLRDNORM;
- }
-
return mask;
}
#endif /* CONFIG_PPP_MULTILINK */
init_rwsem(&pch->chan_sem);
spin_lock_init(&pch->downl);
- rwlock_init(&pch->upl);
+ pch->upl = RW_LOCK_UNLOCKED;
spin_lock_bh(&all_channels_lock);
pch->file.index = ++last_channel_index;
list_add(&pch->list, &new_channels);
/* remove it from the ppp unit's list */
ppp_lock(ppp);
list_del(&pch->clist);
- if (--ppp->n_channels == 0)
- wake_up_interruptible(&ppp->file.rwait);
+ --ppp->n_channels;
ppp_unlock(ppp);
if (atomic_dec_and_test(&ppp->file.refcnt))
ppp_destroy_interface(ppp);