[dahdi-commits] sruffell: branch linux/sruffell/dahdi-linux-transcoder r5912 - in /linux/team...

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Thu Jan 29 11:11:50 CST 2009


Author: sruffell
Date: Thu Jan 29 11:11:50 2009
New Revision: 5912

URL: http://svn.digium.com/svn-view/dahdi?view=rev&rev=5912
Log:
Merged revisions 5835,5842,5848-5850,5856,5870,5895 via svnmerge from 
https://origsvn.digium.com/svn/dahdi/linux/trunk

........
r5835 | sruffell | 2009-01-27 08:09:09 -0800 (Tue, 27 Jan 2009) | 8 lines

- When tearing down channels, use the channel's timeslot as the index into the
  encoder and decoder arrays, and not the channel which is returned from the
  DTE. Issue: DAHDI-231.
- Instead of completely servicing the receive descriptor ring in the
  workqueue, have the interrupt handler queue them up for the workqueue.
- No need to interrupt on both transmit and receive since we expect a
  response to every packet we send.

........
r5842 | sruffell | 2009-01-27 09:01:37 -0800 (Tue, 27 Jan 2009) | 4 lines

Updated wctc4xxp for kernel version 2.6.29.
Closes issue #14285 . 
Reported by: tzafrir

........
r5848 | sruffell | 2009-01-27 09:23:21 -0800 (Tue, 27 Jan 2009) | 3 lines

Passed wrong size to alloc_netdev.
Related to issue #14285 .

........
r5849 | sruffell | 2009-01-27 09:29:22 -0800 (Tue, 27 Jan 2009) | 3 lines

Small tweak to the alloc_netdev call again to use a less error-prone method of
getting the size.   Thanks kpfleming.

........
r5850 | sruffell | 2009-01-27 09:45:37 -0800 (Tue, 27 Jan 2009) | 2 lines

And once again I'm reminded why I should always compile before committing.

........
r5856 | sruffell | 2009-01-27 17:11:36 -0800 (Tue, 27 Jan 2009) | 3 lines

Allow EXTRA_CFLAGS to propagate to builds in the subfolders for wct4xxp,
wctdm24xxp, wctc4xxp, wcb4xxp, and wcte12xp.

........
r5870 | sruffell | 2009-01-27 20:41:45 -0800 (Tue, 27 Jan 2009) | 3 lines

Ensure the teignorered parameter is exposed as a module parameter.
Related to issue #14031 .

........
r5895 | rmudgett | 2009-01-28 15:17:49 -0800 (Wed, 28 Jan 2009) | 1 line

Minor comment rearangement to avoid possible confusion.
........

Modified:
    linux/team/sruffell/dahdi-linux-transcoder/   (props changed)
    linux/team/sruffell/dahdi-linux-transcoder/drivers/dahdi/wcb4xxp/Kbuild
    linux/team/sruffell/dahdi-linux-transcoder/drivers/dahdi/wcb4xxp/base.c
    linux/team/sruffell/dahdi-linux-transcoder/drivers/dahdi/wct4xxp/Kbuild
    linux/team/sruffell/dahdi-linux-transcoder/drivers/dahdi/wctc4xxp/Kbuild
    linux/team/sruffell/dahdi-linux-transcoder/drivers/dahdi/wctc4xxp/base.c
    linux/team/sruffell/dahdi-linux-transcoder/drivers/dahdi/wctdm24xxp/Kbuild
    linux/team/sruffell/dahdi-linux-transcoder/drivers/dahdi/wcte12xp/Kbuild
    linux/team/sruffell/dahdi-linux-transcoder/include/dahdi/user.h

Propchange: linux/team/sruffell/dahdi-linux-transcoder/
------------------------------------------------------------------------------
    automerge = yes

Propchange: linux/team/sruffell/dahdi-linux-transcoder/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Jan 29 11:11:50 2009
@@ -1,1 +1,1 @@
-/linux/trunk:1-5829
+/linux/trunk:1-5911

Modified: linux/team/sruffell/dahdi-linux-transcoder/drivers/dahdi/wcb4xxp/Kbuild
URL: http://svn.digium.com/svn-view/dahdi/linux/team/sruffell/dahdi-linux-transcoder/drivers/dahdi/wcb4xxp/Kbuild?view=diff&rev=5912&r1=5911&r2=5912
==============================================================================
--- linux/team/sruffell/dahdi-linux-transcoder/drivers/dahdi/wcb4xxp/Kbuild (original)
+++ linux/team/sruffell/dahdi-linux-transcoder/drivers/dahdi/wcb4xxp/Kbuild Thu Jan 29 11:11:50 2009
@@ -1,6 +1,6 @@
 obj-m += wcb4xxp.o
 
-EXTRA_CFLAGS := -I$(src)/.. -Wno-undef
+EXTRA_CFLAGS += -I$(src)/.. -Wno-undef
 
 wcb4xxp-objs := base.o
 

Modified: linux/team/sruffell/dahdi-linux-transcoder/drivers/dahdi/wcb4xxp/base.c
URL: http://svn.digium.com/svn-view/dahdi/linux/team/sruffell/dahdi-linux-transcoder/drivers/dahdi/wcb4xxp/base.c?view=diff&rev=5912&r1=5911&r2=5912
==============================================================================
--- linux/team/sruffell/dahdi-linux-transcoder/drivers/dahdi/wcb4xxp/base.c (original)
+++ linux/team/sruffell/dahdi-linux-transcoder/drivers/dahdi/wcb4xxp/base.c Thu Jan 29 11:11:50 2009
@@ -2700,6 +2700,7 @@
 #endif
 module_param(milliwatt, int, S_IRUGO | S_IWUSR);
 module_param(pedanticpci, int, S_IRUGO);
+module_param(teignorered, int, S_IRUGO | S_IWUSR);
 module_param(alarmdebounce, int, S_IRUGO | S_IWUSR);
 module_param(vpmsupport, int, S_IRUGO);
 module_param(timer_1_ms, int, S_IRUGO | S_IWUSR);

Modified: linux/team/sruffell/dahdi-linux-transcoder/drivers/dahdi/wct4xxp/Kbuild
URL: http://svn.digium.com/svn-view/dahdi/linux/team/sruffell/dahdi-linux-transcoder/drivers/dahdi/wct4xxp/Kbuild?view=diff&rev=5912&r1=5911&r2=5912
==============================================================================
--- linux/team/sruffell/dahdi-linux-transcoder/drivers/dahdi/wct4xxp/Kbuild (original)
+++ linux/team/sruffell/dahdi-linux-transcoder/drivers/dahdi/wct4xxp/Kbuild Thu Jan 29 11:11:50 2009
@@ -2,7 +2,7 @@
 
 FIRM_DIR	:= ../firmware
 
-EXTRA_CFLAGS := -I$(src)/.. $(shell $(src)/../oct612x/octasic-helper cflags $(src)/../oct612x) -Wno-undef
+EXTRA_CFLAGS += -I$(src)/.. $(shell $(src)/../oct612x/octasic-helper cflags $(src)/../oct612x) -Wno-undef
 
 ifeq ($(HOTPLUG_FIRMWARE),yes)
   EXTRA_CFLAGS+=-DHOTPLUG_FIRMWARE

Modified: linux/team/sruffell/dahdi-linux-transcoder/drivers/dahdi/wctc4xxp/Kbuild
URL: http://svn.digium.com/svn-view/dahdi/linux/team/sruffell/dahdi-linux-transcoder/drivers/dahdi/wctc4xxp/Kbuild?view=diff&rev=5912&r1=5911&r2=5912
==============================================================================
--- linux/team/sruffell/dahdi-linux-transcoder/drivers/dahdi/wctc4xxp/Kbuild (original)
+++ linux/team/sruffell/dahdi-linux-transcoder/drivers/dahdi/wctc4xxp/Kbuild Thu Jan 29 11:11:50 2009
@@ -2,7 +2,7 @@
 
 FIRM_DIR	:= ../firmware
 
-EXTRA_CFLAGS := -I$(src)/.. -Wno-undef
+EXTRA_CFLAGS += -I$(src)/.. -Wno-undef
 
 ifeq ($(HOTPLUG_FIRMWARE),yes)
   EXTRA_CFLAGS+=-DHOTPLUG_FIRMWARE

Modified: linux/team/sruffell/dahdi-linux-transcoder/drivers/dahdi/wctc4xxp/base.c
URL: http://svn.digium.com/svn-view/dahdi/linux/team/sruffell/dahdi-linux-transcoder/drivers/dahdi/wctc4xxp/base.c?view=diff&rev=5912&r1=5911&r2=5912
==============================================================================
--- linux/team/sruffell/dahdi-linux-transcoder/drivers/dahdi/wctc4xxp/base.c (original)
+++ linux/team/sruffell/dahdi-linux-transcoder/drivers/dahdi/wctc4xxp/base.c Thu Jan 29 11:11:50 2009
@@ -316,10 +316,12 @@
 	unsigned long flags;
 
 	spinlock_t cmd_list_lock;
+	spinlock_t rx_list_lock;
 	/* This is a device-global list of commands that are waiting to be
 	 * transmited (and did not fit on the transmit descriptor ring) */
 	struct list_head cmd_list;
 	struct list_head waiting_for_response_list;
+	struct list_head rx_list;
 
 	unsigned int seq_num;
 	unsigned char numchannels;
@@ -358,8 +360,26 @@
 
 };
 
-static inline void wctc4xxp_set_ready(struct wcdte *wc)
-{
+#ifdef HAVE_NETDEV_PRIV
+struct wcdte_netdev_priv {
+	struct wcdte *wc;
+};
+#endif
+
+static inline struct wcdte *
+wcdte_from_netdev(struct net_device *netdev)
+{
+#ifdef HAVE_NETDEV_PRIV
+	struct wcdte_netdev_priv *priv;
+	priv = netdev_priv(netdev);
+	return priv->wc;
+#else
+	return netdev->priv;
+#endif
+}
+
+
+static inline void wctc4xxp_set_ready(struct wcdte *wc) {
 	set_bit(DTE_READY, &wc->flags);
 }
 
@@ -399,7 +419,6 @@
 	return pt;
 }
 
-
 static struct sk_buff *
 tcb_to_skb(struct net_device *netdev, const struct tcb *cmd)
 {
@@ -443,7 +462,7 @@
 static void
 wctc4xxp_net_set_multi(struct net_device *netdev)
 {
-	struct wcdte *wc = netdev->priv;
+	struct wcdte *wc = wcdte_from_netdev(netdev);
 	DTE_DEBUG(DTE_DEBUG_GENERAL, "%s promiscuity:%d\n",
 	   __func__, netdev->promiscuity);
 }
@@ -451,7 +470,7 @@
 static int
 wctc4xxp_net_up(struct net_device *netdev)
 {
-	struct wcdte *wc = netdev->priv;
+	struct wcdte *wc = wcdte_from_netdev(netdev);
 	DTE_DEBUG(DTE_DEBUG_GENERAL, "%s\n", __func__);
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
 	netif_poll_enable(netdev);
@@ -464,7 +483,7 @@
 static int
 wctc4xxp_net_down(struct net_device *netdev)
 {
-	struct wcdte *wc = netdev->priv;
+	struct wcdte *wc = wcdte_from_netdev(netdev);
 	DTE_DEBUG(DTE_DEBUG_GENERAL, "%s\n", __func__);
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
 	netif_poll_disable(netdev);
@@ -479,7 +498,7 @@
 static int
 wctc4xxp_net_hard_start_xmit(struct sk_buff *skb, struct net_device *netdev)
 {
-	struct wcdte *wc = netdev->priv;
+	struct wcdte *wc = wcdte_from_netdev(netdev);
 	struct tcb *cmd;
 
 	/* We set DO_NOT_CAPTURE because this packet was already captured by
@@ -514,7 +533,7 @@
 static int
 wctc4xxp_poll(struct net_device *netdev, int *budget)
 {
-	struct wcdte *wc = netdev->priv;
+	struct wcdte *wc = wcdte_from_netdev(netdev);
 	int count = 0;
 	int quota = min(netdev->quota, *budget);
 
@@ -540,7 +559,12 @@
 	count = wctc4xxp_net_receive(wc, budget);
 
 	if (!skb_queue_len(&wc->captured_packets))
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
 		netif_rx_complete(wc->netdev, &wc->napi);
+#else
+		netif_rx_complete(&wc->napi);
+#endif
+	}
 	return count;
 }
 #endif
@@ -548,7 +572,7 @@
 static struct net_device_stats *
 wctc4xxp_net_get_stats(struct net_device *netdev)
 {
-	struct wcdte *wc = netdev->priv;
+	struct wcdte *wc = wcdte_from_netdev(netdev);
 	return &wc->net_stats;
 }
 
@@ -585,7 +609,7 @@
 static int
 wctc4xxp_net_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
 {
-	struct wcdte *wc = netdev->priv;
+	struct wcdte *wc = wcdte_from_netdev(netdev);
 	switch (cmd) {
 	case 0x89f0:
 		down(&wc->chansem);
@@ -614,14 +638,24 @@
 {
 	int res;
 	struct net_device *netdev;
+#	ifdef HAVE_NETDEV_PRIV
+	struct wcdte_netdev_priv *priv;
+#	endif
 	const char our_mac[] = { 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff};
 
+#	ifdef HAVE_NETDEV_PRIV
+	netdev = alloc_netdev(sizeof(*priv), wc->board_name, ether_setup);
+	if (!netdev)
+		return -ENOMEM;
+	priv = netdev_priv(netdev);
+	priv->wc = wc;
+#	else
 	netdev = alloc_netdev(0, wc->board_name, ether_setup);
 	if (!netdev)
 		return -ENOMEM;
-
+	netdev->priv = wc;
+#	endif
 	memcpy(netdev->dev_addr, our_mac, sizeof(our_mac));
-	netdev->priv = wc;
 	netdev->set_multicast_list = &wctc4xxp_net_set_multi;
 	netdev->open = &wctc4xxp_net_up;
 	netdev->stop = &wctc4xxp_net_down;
@@ -707,8 +741,10 @@
 	skb_queue_tail(&wc->captured_packets, skb);
 #	if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
 	netif_rx_schedule(netdev);
+#	elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
+	netif_rx_schedule(netdev, &wc->napi);
 #	else
-	netif_rx_schedule(netdev, &wc->napi);
+	netif_rx_schedule(&wc->napi);
 #	endif
 	return;
 }
@@ -823,6 +859,7 @@
 {
 	volatile struct wctc4xxp_descriptor *d;
 	unsigned int len;
+	unsigned long flags;
 
 	WARN_ON(!c);
 	len = (c->data_len < MIN_PACKET_LEN) ? MIN_PACKET_LEN : c->data_len;
@@ -831,11 +868,11 @@
 		c->data_len = MAX_FRAME_SIZE;
 	}
 
-	spin_lock_bh(&dr->lock);
+	spin_lock_irqsave(&dr->lock, flags);
 	d = wctc4xxp_descriptor(dr, dr->tail);
 	WARN_ON(!d);
 	if (d->buffer1) {
-		spin_unlock_bh(&dr->lock);
+		spin_unlock_irqrestore(&dr->lock, flags);
 		/* Do not overwrite a buffer that is still in progress. */
 		return -EBUSY;
 	}
@@ -848,7 +885,7 @@
 	dr->pending[dr->tail] = c;
 	dr->tail = ++dr->tail & DRING_MASK;
 	++dr->count;
-	spin_unlock_bh(&dr->lock);
+	spin_unlock_irqrestore(&dr->lock, flags);
 	return 0;
 }
 
@@ -858,7 +895,8 @@
 	volatile struct wctc4xxp_descriptor *d;
 	struct tcb *c;
 	unsigned int head = dr->head;
-	spin_lock_bh(&dr->lock);
+	unsigned long flags;
+	spin_lock_irqsave(&dr->lock, flags);
 	d = wctc4xxp_descriptor(dr, head);
 	if (d->buffer1 && !OWNED(d)) {
 		pci_unmap_single(dr->pdev, d->buffer1,
@@ -874,16 +912,17 @@
 	} else {
 		c = NULL;
 	}
-	spin_unlock_bh(&dr->lock);
+	spin_unlock_irqrestore(&dr->lock, flags);
 	return c;
 }
 
 static inline int wctc4xxp_getcount(struct wctc4xxp_descriptor_ring *dr)
 {
 	int count;
-	spin_lock_bh(&dr->lock);
+	unsigned long flags;
+	spin_lock_irqsave(&dr->lock, flags);
 	count = dr->count;
-	spin_unlock_bh(&dr->lock);
+	spin_unlock_irqrestore(&dr->lock, flags);
 	return count;
 }
 
@@ -1399,9 +1438,10 @@
 {
 	int i;
 	struct wctc4xxp_descriptor *d;
-
+	unsigned long flags;
+	
 	/* NOTE: The DTE must be in the stopped state. */
-	spin_lock_bh(&dr->lock);
+	spin_lock_irqsave(&dr->lock, flags);
 	for (i = 0; i < DRING_SIZE; ++i) {
 		d = wctc4xxp_descriptor(dr, i);
 		if (d->buffer1) {
@@ -1419,7 +1459,7 @@
 	dr->head = 0;
 	dr->tail = 0;
 	dr->count = 0;
-	spin_unlock_bh(&dr->lock);
+	spin_unlock_irqrestore(&dr->lock, flags);
 	pci_free_consistent(dr->pdev, (sizeof(*d)+dr->padding) * DRING_SIZE,
 		dr->desc, dr->desc_dma);
 }
@@ -1432,10 +1472,11 @@
 	spin_lock_bh(&wc->cmd_list_lock);
 	list_splice_init(&wc->cmd_list, &local_list);
 	list_splice_init(&wc->waiting_for_response_list, &local_list);
+	list_splice_init(&wc->rx_list, &local_list);
 	spin_unlock_bh(&wc->cmd_list_lock);
 
 	while (!list_empty(&local_list)) {
-		cmd = list_entry(local_list.next, struct tcb, node);
+		cmd = list_entry(local_list.next, struct tcb, node); 
 		list_del_init(&cmd->node);
 		free_cmd(cmd);
 	}
@@ -1623,8 +1664,7 @@
 	u8 wctc4xxp_dstfmt; /* Digium Transcoder Engine Dest Format */
 	int res;
 
-	if (down_interruptible(&wc->chansem))
-		return -EINTR;
+	down(&wc->chansem);
 
 	/* Check again to see if the channel was built after grabbing the
 	 * channel semaphore, in case the previous holder of the semaphore
@@ -1705,8 +1745,7 @@
 		return -EIO;
 	}
 
-	if (down_interruptible(&wc->chansem))
-		return -EINTR;
+	down(&wc->chansem);
 
 	/* Remove any packets that are waiting on the outbound queue. */
 	wctc4xxp_cleanup_channel_private(wc, dtc);
@@ -2196,28 +2235,20 @@
 static inline void service_rx_ring(struct wcdte *wc)
 {
 	struct tcb *cmd;
-	while ((cmd = wctc4xxp_retrieve(wc->rxd))) {
-		struct tcb *newcmd;
+	unsigned long flags;
+	LIST_HEAD(local_list);
+	spin_lock_irqsave(&wc->rx_list_lock, flags);
+	list_splice_init(&wc->rx_list, &local_list);
+	spin_unlock_irqrestore(&wc->rx_list_lock, flags);
+
+	/*
+	 * Process the received packets
+	 */
+	while (!list_empty(&local_list)) {
+		cmd = container_of(local_list.next, struct tcb, node);
+		list_del_init(&cmd->node);
+
 		wctc4xxp_net_capture_cmd(wc, cmd);
-
-		newcmd = __alloc_cmd(ALLOC_FLAGS, 0);
-		if(!newcmd) {
-			DTE_PRINTK(ERR, "Out of memory in %s.\n", __FUNCTION__);
-		} else {
-			if (newcmd->data_len < MAX_FRAME_SIZE) {
-				newcmd->data = kmalloc(MAX_FRAME_SIZE, ALLOC_FLAGS);
-				if (!newcmd->data) {
-					DTE_PRINTK(ERR, "out of memory in %s " \
-					    "again.\n", __FUNCTION__);
-				}
-				newcmd->data_len = MAX_FRAME_SIZE;
-			}
-			if (wctc4xxp_submit(wc->rxd, newcmd)) {
-				DTE_PRINTK(ERR, "Failed submit in %s\n", __FUNCTION__);
-				free_cmd(newcmd);
-			}
-			wctc4xxp_receive_demand_poll(wc);
-		}
 		wctc4xxp_receiveprep(wc, cmd);
 	}
 	wctc4xxp_receive_demand_poll(wc);
@@ -2245,6 +2276,7 @@
 DAHDI_IRQ_HANDLER(wctc4xxp_interrupt)
 {
 	struct wcdte *wc = dev_id;
+	struct tcb *cmd;
 	u32 ints;
 	u32 reg;
 #define TX_COMPLETE_INTERRUPT 0x00000001
@@ -2263,8 +2295,28 @@
 		reg = 0;
 		if (ints & TX_COMPLETE_INTERRUPT)
 			reg |= TX_COMPLETE_INTERRUPT;
-		if (ints & RX_COMPLETE_INTERRUPT)
+
+		if (ints & RX_COMPLETE_INTERRUPT) {
+			while ((cmd = wctc4xxp_retrieve(wc->rxd))) {
+				spin_lock(&wc->rx_list_lock);
+				list_add_tail(&cmd->node, &wc->rx_list);
+				spin_unlock(&wc->rx_list_lock);
+
+				cmd = __alloc_cmd(GFP_ATOMIC, 0);
+				if (!cmd) {
+					DTE_PRINTK(ERR,
+					  "Out of memory in %s.\n", __func__);
+				} else {
+					if (wctc4xxp_submit(wc->rxd, cmd)) {
+						DTE_PRINTK(ERR,
+						  "Failed submit in %s\n",
+						  __func__);
+						free_cmd(cmd);
+					}
+				}
+			}
 			reg |= RX_COMPLETE_INTERRUPT;
+		}
 
 #if DEFERRED_PROCESSING == WORKQUEUE
 		schedule_work(&wc->deferred_work);
@@ -2747,8 +2799,9 @@
 static int
 wctc4xxp_destroy_channel_pair(struct wcdte *wc, struct channel_pvt *cpvt)
 {
+	struct dahdi_transcoder_channel *dtc1, *dtc2;
 	struct channel_pvt *encoder_pvt, *decoder_pvt;
-	int chan1, chan2;
+	int chan1, chan2, timeslot1, timeslot2;
 	struct tcb *cmd;
 
 	cmd = alloc_cmd();
@@ -2757,21 +2810,27 @@
 
 	if (cpvt->encoder) {
 		chan1 = cpvt->chan_in_num;
+		timeslot1 = cpvt->timeslot_in_num;
 		chan2 = cpvt->chan_out_num;
+		timeslot2 = cpvt->timeslot_out_num;
 	} else {
 		chan1 = cpvt->chan_out_num;
+		timeslot1 = cpvt->timeslot_out_num;
 		chan2 = cpvt->chan_in_num;
-	}
-
-	if (chan1/2 >= wc->numchannels || chan2/2 >= wc->numchannels) {
-		DTE_PRINTK(WARNING,
+		timeslot2 = cpvt->timeslot_in_num;
+	}
+
+	if (timeslot1/2 >= wc->numchannels || timeslot2/2 >= wc->numchannels) {
+		DTE_PRINTK(WARNING, 
 		 "Invalid channel numbers in %s. chan1:%d chan2: %d\n",
-		 __func__, chan1/2, chan2/2);
+		 __func__, timeslot1/2, timeslot2/2);
 		return 0;
 	}
 
-	encoder_pvt = wc->uencode->channels[chan1/2].pvt;
-	decoder_pvt = wc->udecode->channels[chan2/2].pvt;
+	dtc1 = &(wc->uencode->channels[timeslot1/2]);
+	dtc2 = &(wc->udecode->channels[timeslot2/2]);
+	encoder_pvt = dtc1->pvt;
+	decoder_pvt = dtc2->pvt;
 
 	if (send_voip_vopena_close_cmd(encoder_pvt, cmd))
 		goto error_exit;
@@ -2854,11 +2913,7 @@
 wctc4xxp_setup_channels(struct wcdte *wc)
 {
 	int ret;
-	ret = down_interruptible(&wc->chansem);
-	if (ret) {
-		WARN_ALWAYS();
-		return ret;
-	}
+	down(&wc->chansem);
 	ret = __wctc4xxp_setup_channels(wc);
 	up(&wc->chansem);
 
@@ -3089,9 +3144,11 @@
 	init_MUTEX(&wc->chansem);
 	spin_lock_init(&wc->reglock);
 	spin_lock_init(&wc->cmd_list_lock);
+	spin_lock_init(&wc->rx_list_lock);
 	INIT_LIST_HEAD(&wc->cmd_list);
 	INIT_LIST_HEAD(&wc->waiting_for_response_list);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
+	INIT_LIST_HEAD(&wc->rx_list);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
 	INIT_WORK(&wc->deferred_work, deferred_work_func, wc);
 #else
 	INIT_WORK(&wc->deferred_work, deferred_work_func);

Modified: linux/team/sruffell/dahdi-linux-transcoder/drivers/dahdi/wctdm24xxp/Kbuild
URL: http://svn.digium.com/svn-view/dahdi/linux/team/sruffell/dahdi-linux-transcoder/drivers/dahdi/wctdm24xxp/Kbuild?view=diff&rev=5912&r1=5911&r2=5912
==============================================================================
--- linux/team/sruffell/dahdi-linux-transcoder/drivers/dahdi/wctdm24xxp/Kbuild (original)
+++ linux/team/sruffell/dahdi-linux-transcoder/drivers/dahdi/wctdm24xxp/Kbuild Thu Jan 29 11:11:50 2009
@@ -2,7 +2,7 @@
 
 FIRM_DIR	:= ../firmware
 
-EXTRA_CFLAGS := -I$(src)/.. -Wno-undef
+EXTRA_CFLAGS += -I$(src)/.. -Wno-undef
 
 ifeq ($(HOTPLUG_FIRMWARE),yes)
   EXTRA_CFLAGS+=-DHOTPLUG_FIRMWARE

Modified: linux/team/sruffell/dahdi-linux-transcoder/drivers/dahdi/wcte12xp/Kbuild
URL: http://svn.digium.com/svn-view/dahdi/linux/team/sruffell/dahdi-linux-transcoder/drivers/dahdi/wcte12xp/Kbuild?view=diff&rev=5912&r1=5911&r2=5912
==============================================================================
--- linux/team/sruffell/dahdi-linux-transcoder/drivers/dahdi/wcte12xp/Kbuild (original)
+++ linux/team/sruffell/dahdi-linux-transcoder/drivers/dahdi/wcte12xp/Kbuild Thu Jan 29 11:11:50 2009
@@ -2,7 +2,7 @@
 
 FIRM_DIR	:= ../firmware
 
-EXTRA_CFLAGS := -I$(src)/.. -Wno-undef
+EXTRA_CFLAGS += -I$(src)/.. -Wno-undef
 
 ifeq ($(HOTPLUG_FIRMWARE),yes)
   EXTRA_CFLAGS+=-DHOTPLUG_FIRMWARE

Modified: linux/team/sruffell/dahdi-linux-transcoder/include/dahdi/user.h
URL: http://svn.digium.com/svn-view/dahdi/linux/team/sruffell/dahdi-linux-transcoder/include/dahdi/user.h?view=diff&rev=5912&r1=5911&r2=5912
==============================================================================
--- linux/team/sruffell/dahdi-linux-transcoder/include/dahdi/user.h (original)
+++ linux/team/sruffell/dahdi-linux-transcoder/include/dahdi/user.h Thu Jan 29 11:11:50 2009
@@ -735,12 +735,14 @@
 
 struct dahdi_echocanparam {
 	char name[16];
-        __s32 value;
+	__s32 value;
 };
 
 struct dahdi_echocanparams {
-	__u32 tap_length;		/* 8 taps per millisecond */
-	__u32 param_count;		/* number of parameters supplied */
+	/* 8 taps per millisecond */
+	__u32 tap_length;
+	/* number of parameters supplied */
+	__u32 param_count;
 	/* immediately follow this structure with dahdi_echocanparam structures */
 	struct dahdi_echocanparam params[0];
 };




More information about the dahdi-commits mailing list