[svn-commits] sruffell: linux/trunk r5021 - /linux/trunk/drivers/dahdi/dahdi-base.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Oct 1 16:45:25 CDT 2008


Author: sruffell
Date: Wed Oct  1 16:45:24 2008
New Revision: 5021

URL: http://svn.digium.com/view/dahdi?view=rev&rev=5021
Log:
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.

Modified:
    linux/trunk/drivers/dahdi/dahdi-base.c

Modified: linux/trunk/drivers/dahdi/dahdi-base.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=5021&r1=5020&r2=5021
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Wed Oct  1 16:45:24 2008
@@ -4274,7 +4274,12 @@
 			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);




More information about the svn-commits mailing list