diff options
author | Shaun Ruffell <sruffell@digium.com> | 2008-10-01 21:45:24 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2008-10-01 21:45:24 +0000 |
commit | 5a982e95815dc36dc494e19e546524bc331dd075 (patch) | |
tree | 343bec5d91c77f62d140b5bfffd503730330cc46 /drivers | |
parent | a9ef1d6f921870ea97e2ee20718ba824b676828e (diff) |
DAHDI should always make data received from the PSTN available to user mode
immediately. Only allow the transmit buffering policy to be changed in order
to reduce the chance of underruns to the PSTN.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5021 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/dahdi/dahdi-base.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c index 34668cf..c5dab1c 100644 --- a/drivers/dahdi/dahdi-base.c +++ b/drivers/dahdi/dahdi-base.c @@ -4274,7 +4274,12 @@ static int dahdi_chanandpseudo_ioctl(struct inode *inode, struct file *file, uns return -EINVAL; if (stack.bi.bufsize * stack.bi.numbufs > DAHDI_MAX_BUF_SPACE) return -EINVAL; - chan->rxbufpolicy = stack.bi.rxbufpolicy & 0x1; + /* It does not make sense to allow user mode to change the + * receive buffering policy. DAHDI always provides received + * buffers to upper layers immediately. Transmission is + * different since we might want to allow the kernel to build + * up a buffer in order to prevent underruns from the + * interrupt context. */ chan->txbufpolicy = stack.bi.txbufpolicy & 0x1; if ((rv = dahdi_reallocbufs(chan, stack.bi.bufsize, stack.bi.numbufs))) return (rv); |