[Pkg-voip-commits] r6096 - in /dahdi-linux/trunk/debian/patches: bri_dchan series
tzafrir-guest at alioth.debian.org
tzafrir-guest at alioth.debian.org
Tue Aug 26 18:18:09 UTC 2008
Author: tzafrir-guest
Date: Tue Aug 26 18:18:09 2008
New Revision: 6096
URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=6096
Log:
A version of bri_dchan that seems to work (build xpd_bri).
Modified:
dahdi-linux/trunk/debian/patches/bri_dchan
dahdi-linux/trunk/debian/patches/series
Modified: dahdi-linux/trunk/debian/patches/bri_dchan
URL: http://svn.debian.org/wsvn/pkg-voip/dahdi-linux/trunk/debian/patches/bri_dchan?rev=6096&op=diff
==============================================================================
--- dahdi-linux/trunk/debian/patches/bri_dchan (original)
+++ dahdi-linux/trunk/debian/patches/bri_dchan Tue Aug 26 18:18:09 2008
@@ -3,15 +3,13 @@
# Zaptel expects it as a standard channel with 1000 samples
# per second.
-Index: zaptel-1.2.22/kernel/zaptel.h
-===================================================================
---- zaptel-1.2.22.orig/kernel/zaptel.h 2007-12-04 10:40:30.000000000 +0100
-+++ zaptel-1.2.22/kernel/zaptel.h 2007-12-04 14:35:14.545043151 +0100
-@@ -1056,6 +1056,13 @@
+--- a/include/dahdi/kernel.h
++++ b/include/dahdi/kernel.h
+@@ -132,6 +132,13 @@ struct dahdi_chan {
int do_ppp_error;
struct sk_buff_head ppp_rq;
#endif
-+#ifdef CONFIG_ZAPATA_BRI_DCHANS
++#ifdef CONFIG_DAHDI_BRI_DCHANS
+ int bytes2receive;
+ int maxbytes2transmit; /* size of the tx buffer in the card driver */
+ int bytes2transmit;
@@ -19,44 +17,45 @@
+ int eoftx;
+#endif
spinlock_t lock;
- char name[40]; /* Name */
- /* Specified by zaptel */
-@@ -1294,6 +1301,10 @@
- #define ZT_FLAG_T1PPP (1 << 15)
- #define ZT_FLAG_SIGFREEZE (1 << 16) /* Freeze signalling */
+ char name[40];
+ /* Specified by DAHDI */
+@@ -486,8 +493,15 @@ enum {
+ DAHDI_FLAGBIT_NOSTDTXRX = 17,
+ DAHDI_FLAGBIT_LOOPED = 18,
+ DAHDI_FLAGBIT_MTP2 = 19,
++#if defined(CONFIG_DAHDI_BRI_DCHANS)
++ DAHDI_FLAGBIT_BRIDCHAN = 20,
++#endif
+ };
-+#if defined(CONFIG_ZAPATA_BRI_DCHANS)
-+#define ZT_FLAG_BRIDCHAN (1 << 20)
++#if defined(CONFIG_DAHDI_BRI_DCHANS)
++#define DAHDI_FLAG_BRIDCHAN (1 << (int)DAHDI_FLAG_BRIDCHAN)
+#endif
+
- struct zt_span {
+ struct dahdi_span {
spinlock_t lock;
- void *pvt; /* Private stuff */
-Index: zaptel-1.2.22/kernel/zconfig.h
-===================================================================
---- zaptel-1.2.22.orig/kernel/zconfig.h 2007-12-04 10:40:29.000000000 +0100
-+++ zaptel-1.2.22/kernel/zconfig.h 2007-12-04 14:35:01.329541263 +0100
-@@ -166,4 +166,10 @@
+ void *pvt; /*!< Private stuff */
+--- a/drivers/dahdi/dahdi_config.h
++++ b/drivers/dahdi/dahdi_config.h
+@@ -169,4 +169,10 @@
*/
- /* #define FXSFLASH */
+ /* #define OPTIMIZE_CHANMUTE */
+/*
+ * Uncomment the following for BRI D channels
+ *
+ */
-+#define CONFIG_ZAPATA_BRI_DCHANS
++#define CONFIG_DAHDI_BRI_DCHANS
+
#endif
-Index: zaptel-1.2.22/kernel/zaptel-base.c
-===================================================================
---- zaptel-1.2.22.orig/kernel/zaptel-base.c 2007-12-04 10:40:31.000000000 +0100
-+++ zaptel-1.2.22/kernel/zaptel-base.c 2007-12-04 14:35:14.553042850 +0100
-@@ -5226,11 +5255,40 @@
+--- a/drivers/dahdi/dahdi-base.c
++++ b/drivers/dahdi/dahdi-base.c
+@@ -5863,11 +5863,40 @@ static inline void __dahdi_getbuf_chunk(
*(txb++) = fasthdlc_tx_run_nocheck(&ms->txhdlc);
}
bytes -= left;
-+#ifdef CONFIG_ZAPATA_BRI_DCHANS
-+ } else if (ms->flags & ZT_FLAG_BRIDCHAN) {
++#ifdef CONFIG_DAHDI_BRI_DCHANS
++ } else if (test_bit(DAHDI_FLAGBIT_BRIDCHAN, &ms->flags)) {
+ /*
+ * Let's get this right, we want to transmit complete frames only.
+ * The card driver will do the dirty HDLC work for us.
@@ -86,18 +85,18 @@
ms->writeidx[ms->outwritebuf]+=left;
txb += left;
bytes -= left;
-+#if defined(CONFIG_ZAPATA_BRI_DCHANS)
-+ ms->bytes2transmit=ZT_CHUNKSIZE;
++#if defined(CONFIG_DAHDI_BRI_DCHANS)
++ ms->bytes2transmit=DAHDI_CHUNKSIZE;
+#endif
}
/* Check buffer status */
if (ms->writeidx[ms->outwritebuf] >= ms->writen[ms->outwritebuf]) {
-@@ -5275,6 +5333,17 @@
+@@ -5924,6 +5953,17 @@ out in the later versions, and is put ba
/* Transmit a flag if this is an HDLC channel */
- if (ms->flags & ZT_FLAG_HDLC)
+ if (ms->flags & DAHDI_FLAG_HDLC)
fasthdlc_tx_frame_nocheck(&ms->txhdlc);
-+#if defined(CONFIG_ZAPATA_BRI_DCHANS)
-+ if(ms->flags & ZT_FLAG_BRIDCHAN) {
++#if defined(CONFIG_DAHDI_BRI_DCHANS)
++ if (test_bit(DAHDI_FLAGBIT_BRIDCHAN, &ms->flags)) {
+ // if (ms->bytes2transmit > 0) {
+ // txb += 2;
+ // ms->bytes2transmit -= 2;
@@ -107,28 +106,28 @@
+ // }
+ }
+#endif
- #ifdef CONFIG_ZAPATA_NET
- if (ms->flags & ZT_FLAG_NETDEV)
+ #ifdef CONFIG_DAHDI_NET
+ if (ms->flags & DAHDI_FLAG_NETDEV)
netif_wake_queue(ztchan_to_dev(ms));
-@@ -5335,6 +5404,12 @@
+@@ -5984,6 +6024,12 @@ out in the later versions, and is put ba
memset(txb, 0xFF, bytes);
}
bytes = 0;
-+#if defined(CONFIG_ZAPATA_BRI_DCHANS)
-+ } else if(ms->flags & ZT_FLAG_BRIDCHAN) {
++#if defined(CONFIG_DAHDI_BRI_DCHANS)
++ } else if (test_bit(DAHDI_FLAGBIT_BRIDCHAN, &ms->flags)) {
+ ms->bytes2transmit = 0;
+ ms->eoftx = 0;
+ bytes = 0;
+#endif
} else {
- memset(txb, ZT_LIN2X(0, ms), bytes); /* Lastly we use silence on telephony channels */
+ memset(txb, DAHDI_LIN2X(0, ms), bytes); /* Lastly we use silence on telephony channels */
bytes = 0;
-@@ -6153,6 +6228,14 @@
+@@ -6796,6 +6842,14 @@ static inline void __putbuf_chunk(struct
int res;
int left, x;
-+#if defined(CONFIG_ZAPATA_BRI_DCHANS)
-+ if (ms->flags & ZT_FLAG_BRIDCHAN) {
++#if defined(CONFIG_DAHDI_BRI_DCHANS)
++ if (test_bit(DAHDI_FLAGBIT_BRIDCHAN, &ms->flags)) {
+ bytes = ms->bytes2receive;
+ if (bytes < 1) return;
+// printk(KERN_CRIT "bytes2receive %d\n",ms->bytes2receive);
@@ -136,14 +135,14 @@
+#endif
+
while(bytes) {
- #if defined(CONFIG_ZAPATA_NET) || defined(CONFIG_ZAPATA_PPP)
+ #if defined(CONFIG_DAHDI_NET) || defined(CONFIG_DAHDI_PPP)
skb = NULL;
-@@ -6210,6 +6293,19 @@
+@@ -6853,6 +6907,19 @@ static inline void __putbuf_chunk(struct
}
}
}
-+#ifdef CONFIG_ZAPATA_BRI_DCHANS
-+ } else if (ms->flags & ZT_FLAG_BRIDCHAN) {
++#ifdef CONFIG_DAHDI_BRI_DCHANS
++ } else if (test_bit(DAHDI_FLAGBIT_BRIDCHAN, &ms->flags)) {
+ memcpy(buf + ms->readidx[ms->inreadbuf], rxb, left);
+ rxb += left;
+ ms->readidx[ms->inreadbuf] += left;
Modified: dahdi-linux/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-voip/dahdi-linux/trunk/debian/patches/series?rev=6096&op=diff
==============================================================================
--- dahdi-linux/trunk/debian/patches/series (original)
+++ dahdi-linux/trunk/debian/patches/series Tue Aug 26 18:18:09 2008
@@ -1,5 +1,5 @@
#oslec_zaptel
-#bri_dchan
+bri_dchan
#proc_read
#zt_alarm_notify_no_master_change
#zaphfc-florz
More information about the Pkg-voip-commits
mailing list