[dahdi-commits] dahdi/linux.git branch "master" updated.

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Tue May 20 11:37:14 CDT 2014


branch "master" has been updated
       via  6e2698f4c1ce55818a16e5d1ef5c6ba27d63c3ea (commit)
       via  c9481d30bbc84905f449b8c1bfc2c8f3eaefd9c3 (commit)
       via  779d62791ca41be25e08f2d8e5e6253a1abf7330 (commit)
      from  8342a3d21b2cf86b0f501fd00bf56fb789eca80a (commit)

Summary of changes:
 drivers/dahdi/dahdi-base.c                         |    1 +
 drivers/dahdi/datamods/syncppp.c                   |    1 +
 drivers/dahdi/pciradio.c                           |   28 +-
 drivers/dahdi/tor2.c                               |    1 +
 drivers/dahdi/voicebus/GpakCust.c                  |    1 +
 drivers/dahdi/voicebus/voicebus_net.c              |    1 +
 drivers/dahdi/voicebus/vpmoct.c                    |    1 +
 .../vpmadt032_loader/dahdi_vpmadt032_loader.c      |    1 +
 drivers/dahdi/wcb4xxp/base.c                       |    1 +
 drivers/dahdi/wcfxo.c                              |    1 +
 drivers/dahdi/wct1xxp.c                            |    1 +
 drivers/dahdi/wct4xxp/base.c                       |    1 +
 drivers/dahdi/wctc4xxp/base.c                      |  424 ++++++++++++--------
 drivers/dahdi/wctdm.c                              |    1 +
 drivers/dahdi/wctdm24xxp/base.c                    |    1 +
 drivers/dahdi/wctdm24xxp/xhfc.c                    |    1 +
 drivers/dahdi/wcte11xp.c                           |    1 +
 drivers/dahdi/wcte12xp/base.c                      |    1 +
 drivers/dahdi/wcte43x-base.c                       |    2 +-
 drivers/dahdi/wcxb.c                               |    1 +
 drivers/dahdi/wcxb_spi.c                           |    1 +
 drivers/dahdi/xpp/mmapdrv.c                        |    1 +
 drivers/dahdi/xpp/xbus-core.c                      |    1 +
 drivers/dahdi/xpp/xpd.h                            |    1 +
 24 files changed, 285 insertions(+), 190 deletions(-)


- Log -----------------------------------------------------------------
commit 6e2698f4c1ce55818a16e5d1ef5c6ba27d63c3ea
Author: Shaun Ruffell <sruffell at digium.com>
Date:   Fri May 16 14:33:12 2014 -0500

    wctc4xxp: Speed up channel setup / tear-down.
    
    1) Enabling multiple csm_encaps channel commands in a single packet.
    2) Sending commands to separate channels in parallel.
    
    This reduces the time waiting for the responses to the commands and brings in
    the channel setup from 50ms to under 10ms.
    
    Signed-off-by: Shaun Ruffell <sruffell at digium.com>
    Signed-off-by: Russ Meyerriecks <rmeyerriecks at digium.com>

diff --git a/drivers/dahdi/wctc4xxp/base.c b/drivers/dahdi/wctc4xxp/base.c
index af2d72b..6959d91 100644
--- a/drivers/dahdi/wctc4xxp/base.c
+++ b/drivers/dahdi/wctc4xxp/base.c
@@ -145,14 +145,7 @@ struct rtp_packet {
 	__u8   payload[0];
 } __attribute__((packed));
 
-/* Ethernet packet type for communication control information to the DTE. */
-struct csm_encaps_hdr {
-	struct ethhdr ethhdr;
-	/* CSM_ENCAPS HEADER */
-	__be16 op_code;
-	__u8   seq_num;
-	__u8   control;
-	__be16 channel;
+struct csm_encaps_cmd {
 	/* COMMON PART OF PAYLOAD HEADER */
 	__u8   length;
 	__u8   index;
@@ -163,6 +156,18 @@ struct csm_encaps_hdr {
 	__le16 params[0];
 } __attribute__((packed));
 
+/* Ethernet packet type for communication control information to the DTE. */
+struct csm_encaps_hdr {
+	struct ethhdr ethhdr;
+	/* CSM_ENCAPS HEADER */
+	__be16 op_code;
+	__u8   seq_num;
+	__u8   control;
+	__be16 channel;
+	/* There is always at least one command. */
+	struct csm_encaps_cmd cmd;
+} __attribute__((packed));
+
 #define CONTROL_PACKET_OPCODE  0x0001
 /* Control bits */
 #define LITTLE_ENDIAN	0x01
@@ -202,7 +207,8 @@ struct tcb {
 #define WAIT_FOR_ACK		(1 << 3)
 #define WAIT_FOR_RESPONSE	(1 << 4)
 #define DTE_CMD_TIMEOUT         (1 << 5)
-	unsigned long flags;
+	u16 flags;
+	u16 next_index;
 	struct completion *complete;
 	struct tcb *response;
 	struct channel_pvt *cpvt;
@@ -1028,14 +1034,8 @@ wctc4xxp_transmit_demand_poll(struct wcdte *wc)
 #endif
 }
 
-/* Returns the size, in bytes, of a CSM_ENCAPS packet, given the number of
- * parameters used. */
-#define SIZE_WITH_N_PARAMETERS(__n) (sizeof(struct csm_encaps_hdr) + \
-	((__n) * (sizeof(u16))))
-
-/* There are 20 bytes in the ethernet header and the common CSM_ENCAPS header
- * that we don't want in the length of the actual CSM_ENCAPS command */
-#define LENGTH_WITH_N_PARAMETERS(__n) (SIZE_WITH_N_PARAMETERS(__n) - 20)
+#define LENGTH_WITH_N_PARAMETERS(__n) (((__n) * sizeof(u16)) + \
+					sizeof(struct csm_encaps_cmd))
 
 static const u8 dst_mac[6] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55};
 static const u8 src_mac[6] = {0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF};
@@ -1062,15 +1062,6 @@ setup_supervisor_header(struct wcdte *wc, struct csm_encaps_hdr *hdr)
 }
 
 static void
-setup_channel_header(struct channel_pvt *pvt, struct csm_encaps_hdr *hdr)
-{
-	setup_common_header(pvt->wc, hdr);
-	hdr->op_code = cpu_to_be16(CONTROL_PACKET_OPCODE);
-	hdr->seq_num = (pvt->cmd_seqno++)&0xf;
-	hdr->channel = cpu_to_be16(pvt->chan_in_num);
-}
-
-static void
 create_supervisor_cmd(struct wcdte *wc, struct tcb *cmd, u8 type, u8 class,
 	u16 function, const u16 *parameters, const int num_parameters)
 {
@@ -1084,26 +1075,26 @@ create_supervisor_cmd(struct wcdte *wc, struct tcb *cmd, u8 type, u8 class,
 
 	setup_supervisor_header(wc, hdr);
 
-	hdr->length =		LENGTH_WITH_N_PARAMETERS(num_parameters);
-	hdr->index =		0;
-	hdr->type =		type;
-	hdr->class =		class;
-	hdr->function =		cpu_to_le16(function);
-	hdr->reserved =		0;
+	hdr->cmd.length =	LENGTH_WITH_N_PARAMETERS(num_parameters);
+	hdr->cmd.index =	0;
+	hdr->cmd.type =		type;
+	hdr->cmd.class =	class;
+	hdr->cmd.function =	cpu_to_le16(function);
+	hdr->cmd.reserved =	0;
 
 	for (i = 0; i < num_parameters; ++i)
-		hdr->params[i] = cpu_to_le16(parameters[i]);
+		hdr->cmd.params[i] = cpu_to_le16(parameters[i]);
 
 	cmd->flags = WAIT_FOR_RESPONSE;
-	cmd->data_len = SIZE_WITH_N_PARAMETERS(num_parameters);
+	cmd->data_len = sizeof(struct csm_encaps_hdr) -
+			sizeof(struct csm_encaps_cmd) +
+			hdr->cmd.length;
 	cmd->cpvt = NULL;
 }
 
 static void
-create_channel_cmd(struct channel_pvt *pvt, struct tcb *cmd, u8 type, u8 class,
-	u16 function, const u16 *parameters, int num_parameters)
+setup_channel_header(struct channel_pvt *pvt, struct tcb *cmd)
 {
-	int i;
 	struct csm_encaps_hdr *hdr = cmd->data;
 
 	if (cmd->response) {
@@ -1111,21 +1102,50 @@ create_channel_cmd(struct channel_pvt *pvt, struct tcb *cmd, u8 type, u8 class,
 		cmd->response = NULL;
 	}
 
-	setup_channel_header(pvt, hdr);
+	setup_common_header(pvt->wc, hdr);
+	hdr->op_code = cpu_to_be16(CONTROL_PACKET_OPCODE);
+	hdr->seq_num = (pvt->cmd_seqno++)&0xf;
+	hdr->channel = cpu_to_be16(pvt->chan_in_num);
+
+	cmd->flags = WAIT_FOR_RESPONSE;
+	cmd->data_len = sizeof(struct csm_encaps_hdr) -
+				sizeof(struct csm_encaps_cmd);
+	cmd->cpvt = pvt;
+	cmd->next_index = 0;
+}
+
+
+static void
+append_channel_cmd(struct tcb *cmd, u8 type, u8 class, u16 function,
+		   const u16 *parameters, int num_parameters)
+{
+	int i;
+	struct csm_encaps_cmd *csm_cmd = cmd->data + cmd->data_len;
 
-	hdr->length =	LENGTH_WITH_N_PARAMETERS(num_parameters);
-	hdr->index =	0;
-	hdr->type =	type;
-	hdr->class =	class;
-	hdr->function =	cpu_to_le16(function);
-	hdr->reserved =	0;
+	csm_cmd->length =	LENGTH_WITH_N_PARAMETERS(num_parameters);
+	csm_cmd->index =	cmd->next_index++;
+	csm_cmd->type =		type;
+	csm_cmd->class =	class;
+	csm_cmd->function =	cpu_to_le16(function);
+	csm_cmd->reserved =	0;
 
 	for (i = 0; i < num_parameters; ++i)
-		hdr->params[i] = cpu_to_le16(parameters[i]);
+		csm_cmd->params[i] = cpu_to_le16(parameters[i]);
 
-	cmd->flags = WAIT_FOR_RESPONSE;
-	cmd->data_len = SIZE_WITH_N_PARAMETERS(num_parameters);
-	cmd->cpvt = pvt;
+	cmd->data_len += csm_cmd->length;
+	/* Pad it out to a DW boundary */
+	if (cmd->data_len % 4)
+		cmd->data_len += 4 - (cmd->data_len % 4);
+	WARN_ON(cmd->data_len >= SFRAME_SIZE);
+}
+
+static void
+create_channel_cmd(struct channel_pvt *pvt, struct tcb *cmd, u8 type, u8 class,
+	u16 function, const u16 *parameters, int num_parameters)
+{
+	setup_channel_header(pvt, cmd);
+	append_channel_cmd(cmd, type, class, function, parameters,
+			   num_parameters);
 }
 
 static int
@@ -1143,19 +1163,19 @@ send_create_channel_cmd(struct wcdte *wc, struct tcb *cmd, u16 timeslot,
 	if (res)
 		return res;
 
-	if (0x0000 != response_header(cmd)->params[0]) {
+	if (0x0000 != response_header(cmd)->cmd.params[0]) {
 		if (printk_ratelimit()) {
 			dev_warn(&wc->pdev->dev,
 				 "Failed to create channel in timeslot " \
 				 "%d.  Response from DTE was (%04x).\n",
-				 timeslot, response_header(cmd)->params[0]);
+				 timeslot, response_header(cmd)->cmd.params[0]);
 		}
 		free_cmd(cmd->response);
 		cmd->response = NULL;
 		return -EIO;
 	}
 
-	*channel_number = le16_to_cpu(response_header(cmd)->params[1]);
+	*channel_number = le16_to_cpu(response_header(cmd)->cmd.params[1]);
 	free_cmd(cmd->response);
 	cmd->response = NULL;
 	return 0;
@@ -1276,6 +1296,16 @@ send_spu_features_control_cmd(struct wcdte *wc, struct tcb *cmd, u16 options)
 	return wctc4xxp_transmit_cmd_and_wait(wc, cmd);
 }
 
+/* Allows sending more than one CSM_ENCAPS packet in a single ethernet frame. */
+static int send_csme_multi_cmd(struct wcdte *wc, struct tcb *cmd)
+{
+	const u16 parameters[] = {0x1};
+	create_supervisor_cmd(wc, cmd, CONFIG_CHANGE_TYPE,
+		CONFIG_DEVICE_CLASS, 0x010a, parameters,
+		ARRAY_SIZE(parameters));
+	return wctc4xxp_transmit_cmd_and_wait(wc, cmd);
+}
+
 static int
 send_tdm_opt_cmd(struct wcdte *wc, struct tcb *cmd)
 {
@@ -1299,7 +1329,7 @@ send_destroy_channel_cmd(struct wcdte *wc, struct tcb *cmd, u16 channel)
 	if (res)
 		return res;
 	/* Let's check the response for any error codes.... */
-	result = le16_to_cpu(response_header(cmd)->params[0]);
+	result = le16_to_cpu(response_header(cmd)->cmd.params[0]);
 	if (0x0000 != result) {
 		dev_err(&wc->pdev->dev,
 			"Failed to destroy channel %04d (%04x)\n",
@@ -1309,102 +1339,59 @@ send_destroy_channel_cmd(struct wcdte *wc, struct tcb *cmd, u16 channel)
 	return 0;
 }
 
-static int
-send_set_ip_hdr_channel_cmd(struct channel_pvt *pvt, struct tcb *cmd)
+static void
+append_set_ip_hdr_channel_cmd(struct tcb *cmd)
 {
-	int res;
-	u16 result;
-	struct wcdte *wc = pvt->wc;
 	const u16 parameters[] = {0, 0x0045, 0, 0, 0x0040, 0x1180, 0,
 		0xa8c0, 0x0309, 0xa8c0, 0x0309,
-		swab16(pvt->timeslot_out_num + 0x5000),
-		swab16(pvt->timeslot_in_num + 0x5000),
+		swab16(cmd->cpvt->timeslot_out_num + 0x5000),
+		swab16(cmd->cpvt->timeslot_in_num + 0x5000),
 		0, 0};
-	create_channel_cmd(pvt, cmd, CONFIG_CHANGE_TYPE, CONFIG_CHANNEL_CLASS,
+	append_channel_cmd(cmd, CONFIG_CHANGE_TYPE, CONFIG_CHANNEL_CLASS,
 		0x9000, parameters, ARRAY_SIZE(parameters));
-	res = wctc4xxp_transmit_cmd_and_wait(wc, cmd);
-	if (res)
-		return res;
-	/* Let's check the response for any error codes.... */
-	result = le16_to_cpu(response_header(cmd)->params[0]);
-	if (0x0000 != result) {
-		dev_err(&wc->pdev->dev, "Failure in %s (%04x)\n",
-			__func__, result);
-		return -EIO;
-	}
-	return 0;
 }
 
-static int
-send_voip_vceopt_cmd(struct channel_pvt *pvt, struct tcb *cmd, u16 length)
+static void
+append_voip_vceopt_cmd(struct tcb *cmd, u16 length)
 {
-	int res;
-	u16 result;
-	const u16 parameters[] = {((length << 8)|0x21), 0x1c00, 0x0004, 0, 0};
-	struct wcdte *wc = pvt->wc;
-	create_channel_cmd(pvt, cmd, CONFIG_CHANGE_TYPE, CONFIG_CHANNEL_CLASS,
+	const u16 parameters[] = {((length << 8)|0x21), 0x1c00,
+				  0x0004, 0, 0};
+	append_channel_cmd(cmd, CONFIG_CHANGE_TYPE, CONFIG_CHANNEL_CLASS,
 		0x8001, parameters, ARRAY_SIZE(parameters));
-	res = wctc4xxp_transmit_cmd_and_wait(wc, cmd);
-	if (res)
-		return res;
-	/* Let's check the response for any error codes.... */
-	result = le16_to_cpu(response_header(cmd)->params[0]);
-	if (0x0000 != result) {
-		dev_err(&wc->pdev->dev, "Failure in %s (%04x)\n",
-			__func__, result);
-		return -EIO;
-	}
-	return 0;
 }
 
-static int
-send_voip_tonectl_cmd(struct channel_pvt *pvt, struct tcb *cmd)
+static void
+append_voip_tonectl_cmd(struct tcb *cmd)
 {
-	int res;
-	u16 result;
 	const u16 parameters[] = {0};
-	struct wcdte *wc = pvt->wc;
-	create_channel_cmd(pvt, cmd, CONFIG_CHANGE_TYPE, CONFIG_CHANNEL_CLASS,
+	append_channel_cmd(cmd, CONFIG_CHANGE_TYPE, CONFIG_CHANNEL_CLASS,
 		0x805b, parameters, ARRAY_SIZE(parameters));
-	res = wctc4xxp_transmit_cmd_and_wait(wc, cmd);
-	if (res)
-		return res;
-	/* Let's check the response for any error codes.... */
-	result = le16_to_cpu(response_header(cmd)->params[0]);
-	if (0x0000 != result) {
-		dev_err(&wc->pdev->dev, "Failure in %s (%04x)\n",
-			__func__, result);
-		return -EIO;
-	}
-	return 0;
 }
 
-static int
-send_voip_dtmfopt_cmd(struct channel_pvt *pvt, struct tcb *cmd)
+static void
+append_voip_dtmfopt_cmd(struct tcb *cmd)
 {
 	const u16 parameters[] = {0x0008};
-	create_channel_cmd(pvt, cmd, CONFIG_CHANGE_TYPE, CONFIG_CHANNEL_CLASS,
+	append_channel_cmd(cmd, CONFIG_CHANGE_TYPE, CONFIG_CHANNEL_CLASS,
 		0x8002, parameters, ARRAY_SIZE(parameters));
-	return wctc4xxp_transmit_cmd_and_wait(pvt->wc, cmd);
 }
 
-static int
-send_voip_indctrl_cmd(struct channel_pvt *pvt, struct tcb *cmd)
+static void
+append_voip_indctrl_cmd(struct tcb *cmd)
 {
 	const u16 parameters[] = {0x0007};
-	create_channel_cmd(pvt, cmd, CONFIG_CHANGE_TYPE, CONFIG_CHANNEL_CLASS,
+	append_channel_cmd(cmd, CONFIG_CHANGE_TYPE, CONFIG_CHANNEL_CLASS,
 		0x8084, parameters, ARRAY_SIZE(parameters));
-	return wctc4xxp_transmit_cmd_and_wait(pvt->wc, cmd);
 }
 
-static int
+static void
 send_voip_vopena_cmd(struct channel_pvt *pvt, struct tcb *cmd, u8 format)
 {
 	const u16 parameters[] = {1, ((format<<8)|0x80), 0, 0, 0,
 		0x3412, 0x7856};
 	create_channel_cmd(pvt, cmd, CONFIG_CHANGE_TYPE, CONFIG_CHANNEL_CLASS,
 		0x8000, parameters, ARRAY_SIZE(parameters));
-	return wctc4xxp_transmit_cmd_and_wait(pvt->wc, cmd);
+	wctc4xxp_transmit_cmd(pvt->wc, cmd);
 }
 
 static int
@@ -1418,7 +1405,7 @@ send_voip_vopena_close_cmd(struct channel_pvt *pvt, struct tcb *cmd)
 	if (res)
 		return res;
 	/* Let's check the response for any error codes.... */
-	if (0x0000 != response_header(cmd)->params[0]) {
+	if (0x0000 != response_header(cmd)->cmd.params[0]) {
 		WARN_ON(1);
 		return -EIO;
 	}
@@ -1451,7 +1438,7 @@ _send_trans_connect_cmd(struct wcdte *wc, struct tcb *cmd, u16 enable, u16
 		return res;
 
 	/* Let's check the response for any error codes.... */
-	if (0x0000 != response_header(cmd)->params[0]) {
+	if (0x0000 != response_header(cmd)->cmd.params[0]) {
 		WARN_ON(1);
 		return -EIO;
 	}
@@ -1500,10 +1487,10 @@ send_eth_statistics_cmd(struct wcdte *wc, struct tcb *cmd)
 	res = wctc4xxp_transmit_cmd_and_wait(wc, cmd);
 	if (res)
 		return -EIO;
-	if (0x0000 != response_header(cmd)->params[0]) {
+	if (0x0000 != response_header(cmd)->cmd.params[0]) {
 		dev_info(&wc->pdev->dev,
 			 "Failed to get ethernet stats: 0x%04x\n",
-			 response_header(cmd)->params[0]);
+			 response_header(cmd)->cmd.params[0]);
 		res = -EIO;
 	}
 	return res;
@@ -1517,7 +1504,7 @@ static void wctc4xxp_match_packet_counts(struct wcdte *wc)
 
 	res = send_eth_statistics_cmd(wc, cmd);
 	if (0 == res) {
-		parms = (u32 *)(&response_header(cmd)->params[0]);
+		parms = (u32 *)(&response_header(cmd)->cmd.params[0]);
 		wctc4xxp_set_packet_count(wc->rxd, parms[1]);
 		wctc4xxp_set_packet_count(wc->txd, parms[2]);
 	}
@@ -2319,7 +2306,7 @@ wctc4xxp_send_ack(struct wcdte *wc, u8 seqno, __be16 channel, __le16 function)
 	hdr->seq_num = seqno;
 	hdr->control = 0xe0;
 	hdr->channel = channel;
-	hdr->function = function;
+	hdr->cmd.function = function;
 
 	wctc4xxp_transmit_cmd(wc, cmd);
 }
@@ -2347,7 +2334,7 @@ static void do_rx_response_packet(struct wcdte *wc, struct tcb *cmd)
 	list_for_each_entry_safe(pos, temp,
 		&wc->waiting_for_response_list, node) {
 		listhdr = pos->data;
-		if ((listhdr->function == rxhdr->function) &&
+		if ((listhdr->cmd.function == rxhdr->cmd.function) &&
 		    (listhdr->channel == rxhdr->channel)) {
 
 			/* If this is a channel command, do not complete it if
@@ -2428,10 +2415,10 @@ do_rx_ack_packet(struct wcdte *wc, struct tcb *cmd)
 static inline int
 is_response(const struct csm_encaps_hdr *hdr)
 {
-	return ((0x02 == hdr->type) ||
-		(0x04 == hdr->type) ||
-		(0x0e == hdr->type) ||
-		(0x00 == hdr->type)) ? 1 : 0;
+	return ((0x02 == hdr->cmd.type) ||
+		(0x04 == hdr->cmd.type) ||
+		(0x0e == hdr->cmd.type) ||
+		(0x00 == hdr->cmd.type)) ? 1 : 0;
 }
 
 static void
@@ -2441,7 +2428,7 @@ print_command(struct wcdte *wc, const struct tcb *cmd)
 	const struct csm_encaps_hdr *hdr = cmd->data;
 	char *buffer;
 	const int BUFFER_SIZE = 1024;
-	int parameters = ((hdr->length - 8)/sizeof(__le16));
+	int parameters = ((hdr->cmd.length - 8)/sizeof(__le16));
 
 	buffer = kzalloc(BUFFER_SIZE + 1, GFP_ATOMIC);
 	if (!buffer) {
@@ -2455,12 +2442,12 @@ print_command(struct wcdte *wc, const struct tcb *cmd)
 	curlength += snprintf(buffer + curlength, BUFFER_SIZE - curlength,
 		"length: %02x index: %02x type: %02x "
 		"class: %02x function: %04x",
-		hdr->length, hdr->index, hdr->type, hdr->class,
-		le16_to_cpu(hdr->function));
+		hdr->cmd.length, hdr->cmd.index, hdr->cmd.type, hdr->cmd.class,
+		le16_to_cpu(hdr->cmd.function));
 	for (i = 0; i < parameters; ++i) {
 		curlength += snprintf(buffer + curlength,
 			BUFFER_SIZE - curlength, " %04x",
-			le16_to_cpu(hdr->params[i]));
+			le16_to_cpu(hdr->cmd.params[i]));
 	}
 	dev_info(&wc->pdev->dev, "%s\n", buffer);
 	kfree(buffer);
@@ -2475,49 +2462,50 @@ static void
 receive_csm_encaps_packet(struct wcdte *wc, struct tcb *cmd)
 {
 	const struct csm_encaps_hdr *hdr = cmd->data;
+	const struct csm_encaps_cmd *c = &hdr->cmd;
 
 	if (!(hdr->control & MESSAGE_PACKET)) {
 		const bool suppress_ack = ((hdr->control & SUPPRESS_ACK) > 0);
 
 		if (!suppress_ack) {
 			wctc4xxp_send_ack(wc, hdr->seq_num, hdr->channel,
-					  hdr->function);
+					  c->function);
 		}
 
 		if (is_response(hdr)) {
 
 			do_rx_response_packet(wc, cmd);
 
-		} else if (0xc1 == hdr->type) {
+		} else if (0xc1 == c->type) {
 
-			if (0x75 == hdr->class) {
+			if (0x75 == c->class) {
 				dev_warn(&wc->pdev->dev,
 				   "Received alert (0x%04x) from dsp\n",
-				   le16_to_cpu(hdr->params[0]));
+				   le16_to_cpu(c->params[0]));
 			}
 			free_cmd(cmd);
-		} else if (0xd4 == hdr->type) {
-			if (hdr->params[0] != le16_to_cpu(0xffff)) {
+		} else if (0xd4 == c->type) {
+			if (c->params[0] != le16_to_cpu(0xffff)) {
 				dev_warn(&wc->pdev->dev,
 				   "DTE Failed self test (%04x).\n",
-				   le16_to_cpu(hdr->params[0]));
-			} else if ((hdr->params[1] != le16_to_cpu(0x000c)) &&
-				(hdr->params[1] != le16_to_cpu(0x010c))) {
+				   le16_to_cpu(c->params[0]));
+			} else if ((c->params[1] != le16_to_cpu(0x000c)) &&
+				(c->params[1] != le16_to_cpu(0x010c))) {
 				dev_warn(&wc->pdev->dev,
 				   "Unexpected ERAM status (%04x).\n",
-				   le16_to_cpu(hdr->params[1]));
+				   le16_to_cpu(c->params[1]));
 			} else {
 				wctc4xxp_set_ready(wc);
 				wake_up(&wc->waitq);
 			}
 			free_cmd(cmd);
-		} else if (MONITOR_LIVE_INDICATION_TYPE == hdr->type) {
+		} else if (MONITOR_LIVE_INDICATION_TYPE == c->type) {
 
-			if (hdr->function == 0x0000) {
-				u16 alert_type = le16_to_cpu(hdr->params[0]);
+			if (c->function == 0x0000) {
+				u16 alert_type = le16_to_cpu(c->params[0]);
 				dev_err(&wc->pdev->dev,
-				   "Received alert (0x%04x) from dsp. Please reload driver.\n",
-				   alert_type);
+					"Received alert (0x%04x) from dsp. Please reload driver.\n",
+					alert_type);
 
 				wctc4xxp_reset_processor(wc);
 				set_bit(DTE_SHUTDOWN, &wc->flags);
@@ -2530,7 +2518,8 @@ receive_csm_encaps_packet(struct wcdte *wc, struct tcb *cmd)
 			free_cmd(cmd);
 		} else {
 			dev_warn(&wc->pdev->dev,
-			  "Unknown command type received. %02x\n", hdr->type);
+				 "Unknown command type received. %02x\n",
+				 c->type);
 			free_cmd(cmd);
 		}
 	} else {
@@ -3096,20 +3085,104 @@ wctc4xxp_boot_processor(struct wcdte *wc, const struct firmware *firmware)
 	return 0;
 }
 
-static int
+static void
 setup_half_channel(struct channel_pvt *pvt, struct tcb *cmd, u16 length)
 {
-	if (send_set_ip_hdr_channel_cmd(pvt, cmd))
-		return -EIO;
-	if (send_voip_vceopt_cmd(pvt, cmd, length))
-		return -EIO;
-	if (send_voip_tonectl_cmd(pvt, cmd))
-		return -EIO;
-	if (send_voip_dtmfopt_cmd(pvt, cmd))
-		return -EIO;
-	if (send_voip_indctrl_cmd(pvt, cmd))
-		return -EIO;
-	return 0;
+	setup_channel_header(pvt, cmd);
+
+	append_set_ip_hdr_channel_cmd(cmd);
+	append_voip_vceopt_cmd(cmd, length);
+	append_voip_tonectl_cmd(cmd);
+	append_voip_dtmfopt_cmd(cmd);
+	append_voip_indctrl_cmd(cmd);
+
+	/* To indicate the end of multiple messages. */
+	cmd->data_len += 4;
+	WARN_ON(cmd->data_len >= SFRAME_SIZE);
+
+	wctc4xxp_transmit_cmd(pvt->wc, cmd);
+}
+
+static int wctc4xxp_setup_channels(struct wcdte *wc,
+				   struct channel_pvt *encoder_pvt,
+				   struct channel_pvt *decoder_pvt,
+				   u16 length)
+{
+	int res = 0;
+	struct tcb *encoder_cmd;
+	struct tcb *decoder_cmd;
+	DECLARE_COMPLETION_ONSTACK(encoder_done);
+	DECLARE_COMPLETION_ONSTACK(decoder_done);
+
+	encoder_cmd = alloc_cmd(SFRAME_SIZE);
+	decoder_cmd = alloc_cmd(SFRAME_SIZE);
+
+	if (!encoder_cmd || !decoder_cmd) {
+		res = -ENOMEM;
+		goto error_exit;
+	}
+
+	encoder_cmd->complete = &encoder_done;
+	decoder_cmd->complete = &decoder_done;
+
+	setup_half_channel(encoder_pvt, encoder_cmd, length);
+	setup_half_channel(decoder_pvt, decoder_cmd, length);
+
+	wait_for_completion(&decoder_done);
+	wait_for_completion(&encoder_done);
+
+	if (encoder_cmd->flags & DTE_CMD_TIMEOUT ||
+	    decoder_cmd->flags & DTE_CMD_TIMEOUT) {
+		DTE_DEBUG(DTE_DEBUG_GENERAL, "Timeout waiting for command.\n");
+		res = -EIO;
+	}
+
+	if ((0x0000 != response_header(encoder_cmd)->cmd.params[0]) ||
+	    (0x0000 != response_header(encoder_cmd)->cmd.params[0]))
+		res = -EIO;
+
+error_exit:
+	free_cmd(encoder_cmd);
+	free_cmd(decoder_cmd);
+	return res;
+}
+
+static int wctc4xxp_enable_channels(struct wcdte *wc,
+				    struct channel_pvt *encoder_pvt,
+				    struct channel_pvt *decoder_pvt,
+				    u8 complicated, u8 simple)
+{
+	int res = 0;
+	struct tcb *encoder_cmd;
+	struct tcb *decoder_cmd;
+	DECLARE_COMPLETION_ONSTACK(encoder_done);
+	DECLARE_COMPLETION_ONSTACK(decoder_done);
+
+	encoder_cmd = alloc_cmd(SFRAME_SIZE);
+	decoder_cmd = alloc_cmd(SFRAME_SIZE);
+
+	if (!encoder_cmd || !decoder_cmd) {
+		res = -ENOMEM;
+		goto error_exit;
+	}
+
+	encoder_cmd->complete = &encoder_done;
+	decoder_cmd->complete = &decoder_done;
+
+	send_voip_vopena_cmd(encoder_pvt, encoder_cmd, complicated);
+	send_voip_vopena_cmd(decoder_pvt, decoder_cmd, simple);
+
+	wait_for_completion(&decoder_done);
+	wait_for_completion(&encoder_done);
+
+	if ((0x0000 != response_header(encoder_cmd)->cmd.params[0]) ||
+	    (0x0000 != response_header(decoder_cmd)->cmd.params[0]))
+		res = -EIO;
+
+error_exit:
+	free_cmd(encoder_cmd);
+	free_cmd(decoder_cmd);
+	return res;
 }
 
 static int
@@ -3119,8 +3192,8 @@ wctc4xxp_create_channel_pair(struct wcdte *wc, struct channel_pvt *cpvt,
 	struct channel_pvt *encoder_pvt, *decoder_pvt;
 	u16 encoder_timeslot, decoder_timeslot;
 	u16 encoder_channel, decoder_channel;
-	u16 length;
 	struct tcb *cmd;
+	u16 length;
 
 	cmd = alloc_cmd(SFRAME_SIZE);
 	if (!cmd)
@@ -3139,6 +3212,10 @@ wctc4xxp_create_channel_pair(struct wcdte *wc, struct channel_pvt *cpvt,
 		complicated = temp;
 	}
 
+	length = (DTE_FORMAT_G729A == complicated) ? G729_LENGTH :
+		(DTE_FORMAT_G723_1 == complicated) ? G723_LENGTH : 0;
+
+
 	BUG_ON(encoder_timeslot/2 >= wc->numchannels);
 	BUG_ON(decoder_timeslot/2 >= wc->numchannels);
 	encoder_pvt = wc->uencode->channels[encoder_timeslot/2].pvt;
@@ -3163,28 +3240,23 @@ wctc4xxp_create_channel_pair(struct wcdte *wc, struct channel_pvt *cpvt,
 	   "DTE is using the following channels encoder_channel: " \
 	   "%d decoder_channel: %d\n", encoder_channel, decoder_channel);
 
-	length = (DTE_FORMAT_G729A == complicated) ? G729_LENGTH :
-		(DTE_FORMAT_G723_1 == complicated) ? G723_LENGTH : 0;
-
 	WARN_ON(encoder_channel == decoder_channel);
 	/* Now set all the default parameters for the encoder. */
 	encoder_pvt->chan_in_num = encoder_channel;
 	encoder_pvt->chan_out_num = decoder_channel;
-	if (setup_half_channel(encoder_pvt, cmd, length))
-		goto error_exit;
 
-	/* And likewise for the decoder. */
 	decoder_pvt->chan_in_num = decoder_channel;
 	decoder_pvt->chan_out_num = encoder_channel;
-	if (setup_half_channel(decoder_pvt, cmd, length))
+
+	if (wctc4xxp_setup_channels(wc, encoder_pvt, decoder_pvt, length))
 		goto error_exit;
 
 	if (send_trans_connect_cmd(wc, cmd, encoder_channel,
 		decoder_channel, complicated, simple))
 		goto error_exit;
-	if (send_voip_vopena_cmd(encoder_pvt, cmd, complicated))
-		goto error_exit;
-	if (send_voip_vopena_cmd(decoder_pvt, cmd, simple))
+
+	if (wctc4xxp_enable_channels(wc, encoder_pvt, decoder_pvt,
+				     complicated, simple))
 		goto error_exit;
 
 	DTE_DEBUG(DTE_DEBUG_CHANNEL_SETUP,
@@ -3252,7 +3324,7 @@ static void print_vceinfo_packet(struct wcdte *wc, struct tcb *cmd)
 		{ "Discarded Packets Due to Insufficient Memory      ", true}
 	};
 
-	u32 *parms = (u32 *)(&response_header(cmd)->params[0]);
+	u32 *parms = (u32 *)(&response_header(cmd)->cmd.params[0]);
 	for (i = 0; i < 43; ++i) {
 		if (PARAMETERS[i].show)
 			dev_info(dev, "%s%d\n", PARAMETERS[i].name, parms[i]);
@@ -3279,7 +3351,7 @@ static void print_eth_statistics_packet(struct wcdte *wc, struct tcb *cmd)
 		{ "Received VLAN frames with E-RIF ", true}
 	};
 
-	u32 *parms = (u32 *)(&response_header(cmd)->params[0]);
+	u32 *parms = (u32 *)(&response_header(cmd)->cmd.params[0]);
 	for (i = 0; i < sizeof(PARAMETERS)/sizeof(PARAMETERS[0]); ++i) {
 		if (PARAMETERS[i].show)
 			dev_info(dev, "%s%d\n", PARAMETERS[i].name, parms[i]);
@@ -3370,8 +3442,7 @@ error_exit:
 }
 
 
-static int
-wctc4xxp_setup_channels(struct wcdte *wc)
+static int wctc4xxp_setup_device(struct wcdte *wc)
 {
 	struct tcb *cmd;
 	int tdm_bus;
@@ -3418,6 +3489,9 @@ wctc4xxp_setup_channels(struct wcdte *wc)
 	if (send_spu_features_control_cmd(wc, cmd, 0x04))
 		goto error_exit;
 
+	if (send_csme_multi_cmd(wc, cmd))
+		goto error_exit;
+
 	if (send_tdm_opt_cmd(wc, cmd))
 		goto error_exit;
 
@@ -3825,7 +3899,7 @@ wctc4xxp_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 #if defined(CONFIG_WCTC4XXP_POLLING)
 	wctc4xxp_enable_polling(wc);
 #endif
-	res = wctc4xxp_setup_channels(wc);
+	res = wctc4xxp_setup_device(wc);
 	if (res)
 		goto error_exit_hwinit;
 

commit c9481d30bbc84905f449b8c1bfc2c8f3eaefd9c3
Author: Shaun Ruffell <sruffell at digium.com>
Date:   Sun May 18 02:49:30 2014 -0500

    pciradio: interruptible_sleep_on_timeout() -> msleep_interruptible()
    
    interruptible_sleep_on_timeout() has been deprecated for awhile and was finally
    removed in Linux 3.15. Since interruptible_sleep_on_timeout() uses jiffies for
    the delay, I assumed that each jiffy equated to 10ms given the age of the
    driver.
    
    Signed-off-by: Shaun Ruffell <sruffell at digium.com>
    Acked-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
    Signed-off-by: Russ Meyerriecks <rmeyerriecks at digium.com>

diff --git a/drivers/dahdi/pciradio.c b/drivers/dahdi/pciradio.c
index 9231593..07b85b3 100644
--- a/drivers/dahdi/pciradio.c
+++ b/drivers/dahdi/pciradio.c
@@ -52,6 +52,7 @@ With driver:	303826  (1.5 %)
 #include <linux/moduleparam.h>
 #include <linux/sched.h>
 #include <linux/slab.h>
+#include <linux/delay.h>
 #include <asm/io.h>
 #include <asm/delay.h> 
 
@@ -481,8 +482,6 @@ static void rbi_out(struct pciradio *rad, int n, unsigned char *rbicmd)
 {
 unsigned long flags;
 int	x;
-DECLARE_WAIT_QUEUE_HEAD(mywait);
-
 
 	for(;;)
 	{
@@ -490,7 +489,8 @@ DECLARE_WAIT_QUEUE_HEAD(mywait);
 		x = rad->remote_locked || (__pciradio_getcreg(rad,0xc) & 2);
 		if (!x) rad->remote_locked = 1;
 		spin_unlock_irqrestore(&rad->lock,flags);
-		if (x) interruptible_sleep_on_timeout(&mywait,2);
+		if (x)
+			msleep_interruptible(20);
 		else break;
 	}	
 	spin_lock_irqsave(&rad->lock,flags);
@@ -527,7 +527,6 @@ static void mx828_command(struct pciradio *rad,int channel, unsigned char comman
 
 static void mx828_command_wait(struct pciradio *rad,int channel, unsigned char command, unsigned char *byte1, unsigned char *byte2)
 {
-DECLARE_WAIT_QUEUE_HEAD(mywait);
 unsigned long flags;
 
 
@@ -535,7 +534,7 @@ unsigned long flags;
 	while(rad->encdec.state)
 	{
 		spin_unlock_irqrestore(&rad->lock,flags);  
-		interruptible_sleep_on_timeout(&mywait,2);   
+		msleep_interruptible(20);
 		spin_lock_irqsave(&rad->lock,flags);  
 	}
 	rad->encdec.lastcmd = jiffies + 1000;
@@ -967,7 +966,6 @@ static int pciradio_ioctl(struct dahdi_chan *chan, unsigned int cmd, unsigned lo
 	} stack;
 
 	struct pciradio *rad = chan->pvt;
-	DECLARE_WAIT_QUEUE_HEAD(mywait);
 
 	switch (cmd) {
 	case DAHDI_RADIO_GETPARAM:
@@ -1255,7 +1253,7 @@ static int pciradio_ioctl(struct dahdi_chan *chan, unsigned int cmd, unsigned lo
 				__pciradio_setcreg(rad,8,byte2);
 				spin_unlock_irqrestore(&rad->lock,flags);
 				if (i || (jiffies < rad->lastremcmd + 10))
-					interruptible_sleep_on_timeout(&mywait,10);
+					msleep_interruptible(100);
 				rad->lastremcmd = jiffies;
 				rbi_out(rad,chan->chanpos - 1,(unsigned char *)&stack.p.data);
 				spin_lock_irqsave(&rad->lock,flags);
@@ -1270,7 +1268,8 @@ static int pciradio_ioctl(struct dahdi_chan *chan, unsigned int cmd, unsigned lo
 				x = rad->remote_locked || (__pciradio_getcreg(rad,0xc) & 2);
 				if (!x) rad->remote_locked = 1;
 				spin_unlock_irqrestore(&rad->lock,flags);
-				if (x) interruptible_sleep_on_timeout(&mywait,2);
+				if (x)
+					msleep_interruptible(20);
 				else break;
 			}	
 			spin_lock_irqsave(&rad->lock,flags);
@@ -1287,14 +1286,14 @@ static int pciradio_ioctl(struct dahdi_chan *chan, unsigned int cmd, unsigned lo
 			__pciradio_setcreg(rad,8,byte2);
 			spin_unlock_irqrestore(&rad->lock,flags);
 			if (byte1 != byte2) 
-				interruptible_sleep_on_timeout(&mywait,3);
+				msleep_interruptible(30);
 			while (jiffies < rad->lastremcmd + 10)
-				interruptible_sleep_on_timeout(&mywait,10);
+				msleep_interruptible(100);
 			rad->lastremcmd = jiffies;
 			for(;;)
 			{
 				if (!(__pciradio_getcreg(rad,0xc) & 2)) break;
- 				interruptible_sleep_on_timeout(&mywait,2);
+				msleep_interruptible(20);
 			}
 			spin_lock_irqsave(&rad->lock,flags);
 			/* enable and address async serializer */
@@ -1316,7 +1315,7 @@ static int pciradio_ioctl(struct dahdi_chan *chan, unsigned int cmd, unsigned lo
 					(!strchr((char *)rad->rxbuf,'\r'))))
 				{
 					spin_unlock_irqrestore(&rad->lock,flags);
-					interruptible_sleep_on_timeout(&mywait,2);
+					msleep_interruptible(20);
 					spin_lock_irqsave(&rad->lock,flags);
 					continue;
 				}
@@ -1336,7 +1335,7 @@ static int pciradio_ioctl(struct dahdi_chan *chan, unsigned int cmd, unsigned lo
 				while(rad->txlen && (rad->txindex < rad->txlen))
 				{
 					spin_unlock_irqrestore(&rad->lock,flags);
-					interruptible_sleep_on_timeout(&mywait,2);
+					msleep_interruptible(20);
 					spin_lock_irqsave(&rad->lock,flags);
 				}
 				/* disable and un-address async serializer */
@@ -1345,7 +1344,7 @@ static int pciradio_ioctl(struct dahdi_chan *chan, unsigned int cmd, unsigned lo
 			rad->remote_locked = 0;
 			spin_unlock_irqrestore(&rad->lock,flags);
 			if (rad->remmode[chan->chanpos - 1] == DAHDI_RADPAR_REM_SERIAL_ASCII)
-				interruptible_sleep_on_timeout(&mywait,100);
+				msleep_interruptible(1000);
 			if (copy_to_user((__user void *) data, &stack.p, sizeof(stack.p))) return -EFAULT;
 			return 0;
 		default:

commit 779d62791ca41be25e08f2d8e5e6253a1abf7330
Author: Shaun Ruffell <sruffell at digium.com>
Date:   Fri Feb 28 09:28:46 2014 -0600

    Add #include <linux/slab.h> to all files that call kzalloc|kmalloc|kfree.
    
    Some architectures, like arm, do not automatically pull in the definitions for
    kzalloc and friends. This allows DAHDI to build on those platforms.
    
    Originally reported to the asterisk-users mailing list here
    http://lists.digium.com/pipermail/asterisk-users/2014-February/282338.html
    
    Signed-off-by: Shaun Ruffell <sruffell at digium.com>
    Acked-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
    Signed-off-by: Russ Meyerriecks <rmeyerriecks at digium.com>

diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c
index c8e58cf..c49f465 100644
--- a/drivers/dahdi/dahdi-base.c
+++ b/drivers/dahdi/dahdi-base.c
@@ -51,6 +51,7 @@
 #include <linux/delay.h>
 #include <linux/mutex.h>
 #include <linux/ktime.h>
+#include <linux/slab.h>
 
 #if defined(HAVE_UNLOCKED_IOCTL) && defined(CONFIG_BKL)
 #include <linux/smp_lock.h>
diff --git a/drivers/dahdi/datamods/syncppp.c b/drivers/dahdi/datamods/syncppp.c
index 2b63a01..1a59caf 100644
--- a/drivers/dahdi/datamods/syncppp.c
+++ b/drivers/dahdi/datamods/syncppp.c
@@ -51,6 +51,7 @@
 #include <linux/pkt_sched.h>
 #include <linux/spinlock.h>
 #include <linux/rcupdate.h>
+#include <linux/slab.h>
 
 #include <net/syncppp.h>
 
diff --git a/drivers/dahdi/pciradio.c b/drivers/dahdi/pciradio.c
index 0384908..9231593 100644
--- a/drivers/dahdi/pciradio.c
+++ b/drivers/dahdi/pciradio.c
@@ -51,6 +51,7 @@ With driver:	303826  (1.5 %)
 #include <linux/interrupt.h>
 #include <linux/moduleparam.h>
 #include <linux/sched.h>
+#include <linux/slab.h>
 #include <asm/io.h>
 #include <asm/delay.h> 
 
diff --git a/drivers/dahdi/tor2.c b/drivers/dahdi/tor2.c
index 2855c12..f0ad710 100644
--- a/drivers/dahdi/tor2.c
+++ b/drivers/dahdi/tor2.c
@@ -31,6 +31,7 @@
 #include <linux/sched.h>
 #include <linux/interrupt.h>
 #include <linux/moduleparam.h>
+#include <linux/slab.h>
 
 #include <dahdi/kernel.h>
 #define NEED_PCI_IDS
diff --git a/drivers/dahdi/voicebus/GpakCust.c b/drivers/dahdi/voicebus/GpakCust.c
index 271b631..31eefc3 100644
--- a/drivers/dahdi/voicebus/GpakCust.c
+++ b/drivers/dahdi/voicebus/GpakCust.c
@@ -38,6 +38,7 @@
 #else
 #include <asm/semaphore.h>
 #endif
+#include <linux/slab.h>
 
 #include <dahdi/kernel.h>
 #include <dahdi/user.h>
diff --git a/drivers/dahdi/voicebus/voicebus_net.c b/drivers/dahdi/voicebus/voicebus_net.c
index 41fca2f..c90bb2a 100644
--- a/drivers/dahdi/voicebus/voicebus_net.c
+++ b/drivers/dahdi/voicebus/voicebus_net.c
@@ -27,6 +27,7 @@
 #include <linux/version.h>
 #include <linux/kernel.h>
 #include <linux/pci.h>
+#include <linux/slab.h>
 
 #include <dahdi/kernel.h>
 
diff --git a/drivers/dahdi/voicebus/vpmoct.c b/drivers/dahdi/voicebus/vpmoct.c
index 1cb2193..67fc911 100644
--- a/drivers/dahdi/voicebus/vpmoct.c
+++ b/drivers/dahdi/voicebus/vpmoct.c
@@ -26,6 +26,7 @@
 #include <linux/delay.h>
 #include <linux/sched.h>
 #include <linux/crc32.h>
+#include <linux/slab.h>
 
 #include "voicebus/vpmoct.h"
 #include "linux/firmware.h"
diff --git a/drivers/dahdi/vpmadt032_loader/dahdi_vpmadt032_loader.c b/drivers/dahdi/vpmadt032_loader/dahdi_vpmadt032_loader.c
index 1db93ee..d614a6d 100644
--- a/drivers/dahdi/vpmadt032_loader/dahdi_vpmadt032_loader.c
+++ b/drivers/dahdi/vpmadt032_loader/dahdi_vpmadt032_loader.c
@@ -23,6 +23,7 @@
 #include <linux/ctype.h>
 #include <linux/moduleparam.h>
 #include <linux/pci.h>
+#include <linux/slab.h>
 
 #include <dahdi/kernel.h>
 
diff --git a/drivers/dahdi/wcb4xxp/base.c b/drivers/dahdi/wcb4xxp/base.c
index e70b7c9..218611c 100644
--- a/drivers/dahdi/wcb4xxp/base.c
+++ b/drivers/dahdi/wcb4xxp/base.c
@@ -40,6 +40,7 @@
 #include <linux/timer.h>	/* timer_struct */
 #include <linux/moduleparam.h>
 #include <linux/proc_fs.h>
+#include <linux/slab.h>
 
 #include <dahdi/kernel.h>
 
diff --git a/drivers/dahdi/wcfxo.c b/drivers/dahdi/wcfxo.c
index b22586b..63f5749 100644
--- a/drivers/dahdi/wcfxo.c
+++ b/drivers/dahdi/wcfxo.c
@@ -31,6 +31,7 @@
 #include <linux/pci.h>
 #include <asm/io.h>
 #include <linux/moduleparam.h>
+#include <linux/slab.h>
 
 #include <dahdi/kernel.h>
 
diff --git a/drivers/dahdi/wct1xxp.c b/drivers/dahdi/wct1xxp.c
index 11b904a..adc917e 100644
--- a/drivers/dahdi/wct1xxp.c
+++ b/drivers/dahdi/wct1xxp.c
@@ -32,6 +32,7 @@
 #include <linux/pci.h>
 #include <linux/spinlock.h>
 #include <linux/moduleparam.h>
+#include <linux/slab.h>
 
 #include <dahdi/kernel.h>
 
diff --git a/drivers/dahdi/wct4xxp/base.c b/drivers/dahdi/wct4xxp/base.c
index 20432a5..ebcdf03 100644
--- a/drivers/dahdi/wct4xxp/base.c
+++ b/drivers/dahdi/wct4xxp/base.c
@@ -40,6 +40,7 @@
 #include <linux/delay.h>
 #include <linux/moduleparam.h>
 #include <linux/crc32.h>
+#include <linux/slab.h>
 
 #include <stdbool.h>
 #include <dahdi/kernel.h>
diff --git a/drivers/dahdi/wctdm.c b/drivers/dahdi/wctdm.c
index 021cfd9..52302ea 100644
--- a/drivers/dahdi/wctdm.c
+++ b/drivers/dahdi/wctdm.c
@@ -31,6 +31,7 @@
 #include <linux/interrupt.h>
 #include <linux/moduleparam.h>
 #include <linux/sched.h>
+#include <linux/slab.h>
 #include <asm/io.h>
 #include "proslic.h"
 
diff --git a/drivers/dahdi/wctdm24xxp/base.c b/drivers/dahdi/wctdm24xxp/base.c
index abf6073..8ecb125 100644
--- a/drivers/dahdi/wctdm24xxp/base.c
+++ b/drivers/dahdi/wctdm24xxp/base.c
@@ -55,6 +55,7 @@ Tx Gain - W/Pre-Emphasis: -23.99 to 0.00 db
 #include <asm/semaphore.h>
 #endif
 #include <linux/crc32.h>
+#include <linux/slab.h>
 
 #include <stdbool.h>
 
diff --git a/drivers/dahdi/wctdm24xxp/xhfc.c b/drivers/dahdi/wctdm24xxp/xhfc.c
index bd82fb4..e283e6f 100644
--- a/drivers/dahdi/wctdm24xxp/xhfc.c
+++ b/drivers/dahdi/wctdm24xxp/xhfc.c
@@ -25,6 +25,7 @@
 #include <linux/ppp_defs.h>
 #include <linux/delay.h>
 #include <linux/sched.h>
+#include <linux/slab.h>
 
 #define FAST_HDLC_NEED_TABLES
 #include <dahdi/kernel.h>
diff --git a/drivers/dahdi/wcte11xp.c b/drivers/dahdi/wcte11xp.c
index 54ad2e8..b5db12c 100644
--- a/drivers/dahdi/wcte11xp.c
+++ b/drivers/dahdi/wcte11xp.c
@@ -31,6 +31,7 @@
 #include <linux/pci.h>
 #include <linux/spinlock.h>
 #include <linux/moduleparam.h>
+#include <linux/slab.h>
 
 #include <dahdi/kernel.h>
 
diff --git a/drivers/dahdi/wcte12xp/base.c b/drivers/dahdi/wcte12xp/base.c
index ad3b3df..0da767f 100644
--- a/drivers/dahdi/wcte12xp/base.c
+++ b/drivers/dahdi/wcte12xp/base.c
@@ -40,6 +40,7 @@
 #include <linux/workqueue.h>
 #include <linux/delay.h>
 #include <linux/sched.h>
+#include <linux/slab.h>
 
 #include <stdbool.h>
 #include <dahdi/kernel.h>
diff --git a/drivers/dahdi/wcte43x-base.c b/drivers/dahdi/wcte43x-base.c
index efc8617..34dd74b 100644
--- a/drivers/dahdi/wcte43x-base.c
+++ b/drivers/dahdi/wcte43x-base.c
@@ -34,8 +34,8 @@
 #include <linux/delay.h>
 #include <linux/sched.h>
 #include <linux/crc32.h>
-
 #include <linux/slab.h>
+
 #include <linux/vmalloc.h>
 #include <linux/string.h>
 #include <linux/time.h>
diff --git a/drivers/dahdi/wcxb.c b/drivers/dahdi/wcxb.c
index cf96ef8..9ab53c8 100644
--- a/drivers/dahdi/wcxb.c
+++ b/drivers/dahdi/wcxb.c
@@ -29,6 +29,7 @@
 #include <linux/crc32.h>
 #include <linux/delay.h>
 #include <linux/version.h>
+#include <linux/slab.h>
 
 #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 26)
 #define HAVE_RATELIMIT
diff --git a/drivers/dahdi/wcxb_spi.c b/drivers/dahdi/wcxb_spi.c
index d7313c6..b615eda 100644
--- a/drivers/dahdi/wcxb_spi.c
+++ b/drivers/dahdi/wcxb_spi.c
@@ -28,6 +28,7 @@
 #include <linux/completion.h>
 #include <linux/sched.h>
 #include <linux/delay.h>
+#include <linux/slab.h>
 
 #include <linux/io.h>
 
diff --git a/drivers/dahdi/xpp/mmapdrv.c b/drivers/dahdi/xpp/mmapdrv.c
index 05393ad..f0d6548 100644
--- a/drivers/dahdi/xpp/mmapdrv.c
+++ b/drivers/dahdi/xpp/mmapdrv.c
@@ -4,6 +4,7 @@
 #include <linux/proc_fs.h>
 #include <linux/interrupt.h>
 #include <linux/firmware.h>
+#include <linux/slab.h>
 #include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/blackfin.h>
diff --git a/drivers/dahdi/xpp/xbus-core.c b/drivers/dahdi/xpp/xbus-core.c
index d5ad1ec..5671618 100644
--- a/drivers/dahdi/xpp/xbus-core.c
+++ b/drivers/dahdi/xpp/xbus-core.c
@@ -27,6 +27,7 @@
 #include <linux/mutex.h>
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
+#include <linux/slab.h>
 #ifdef	PROTOCOL_DEBUG
 #include <linux/ctype.h>
 #endif
diff --git a/drivers/dahdi/xpp/xpd.h b/drivers/dahdi/xpp/xpd.h
index 2f505ae..3939d76 100644
--- a/drivers/dahdi/xpp/xpd.h
+++ b/drivers/dahdi/xpp/xpd.h
@@ -31,6 +31,7 @@
 #include <linux/device.h>
 #include <linux/version.h>
 #include <asm/atomic.h>
+#include <linux/slab.h>
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
 #include <linux/semaphore.h>
 #else

-----------------------------------------------------------------------


-- 
dahdi/linux.git



More information about the dahdi-commits mailing list