[svn-commits] fjoe: freebsd/trunk r10597 - in /freebsd/trunk: ./ bsd-kmod/ bsd-kmod/dahdi-f...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Mon Mar 26 12:41:10 CDT 2012
Author: fjoe
Date: Mon Mar 26 12:40:58 2012
New Revision: 10597
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10597
Log:
Merge up to r10596 from dahdi-linux/trunk (post-2.6.0).
This is WIP (the code compiles cleanly at this stage
but was not extensively tested).
Added:
freebsd/trunk/bsd-kmod/dahdi-fw-oct6114-256.bin/
- copied from r10471, freebsd/trunk/bsd-kmod/dahdi-fw-oct6114-128.bin/
freebsd/trunk/bsd-kmod/dahdi-fw-te820.bin/
- copied from r10471, freebsd/trunk/bsd-kmod/dahdi-fw-hx8.bin/
freebsd/trunk/bsd-kmod/dahdi-fw-vpmoct032.bin/
- copied from r10471, freebsd/trunk/bsd-kmod/dahdi-fw-hx8.bin/
freebsd/trunk/drivers/dahdi/dahdi-sysfs-chan.c
- copied, changed from r10471, linux/trunk/drivers/dahdi/dahdi-sysfs-chan.c
freebsd/trunk/drivers/dahdi/dahdi-sysfs.c
- copied, changed from r10471, linux/trunk/drivers/dahdi/dahdi-sysfs.c
freebsd/trunk/drivers/dahdi/dahdi-sysfs.h
- copied, changed from r10471, linux/trunk/drivers/dahdi/dahdi-sysfs.h
freebsd/trunk/drivers/dahdi/dahdi-version.c
- copied, changed from r10471, linux/trunk/drivers/dahdi/dahdi-version.c
freebsd/trunk/drivers/dahdi/dahdi.h
- copied, changed from r10471, linux/trunk/drivers/dahdi/dahdi.h
freebsd/trunk/drivers/dahdi/voicebus/vpmoct.c
- copied, changed from r10471, linux/trunk/drivers/dahdi/voicebus/vpmoct.c
freebsd/trunk/drivers/dahdi/voicebus/vpmoct.h
- copied unchanged from r10471, linux/trunk/drivers/dahdi/voicebus/vpmoct.h
freebsd/trunk/drivers/dahdi/xpp/card_echo.c
- copied, changed from r10471, linux/trunk/drivers/dahdi/xpp/card_echo.c
freebsd/trunk/drivers/dahdi/xpp/card_echo.h
- copied unchanged from r10471, linux/trunk/drivers/dahdi/xpp/card_echo.h
freebsd/trunk/drivers/dahdi/xpp/firmwares/FPGA_1161.201.hex
- copied unchanged from r10596, linux/trunk/drivers/dahdi/xpp/firmwares/FPGA_1161.201.hex
freebsd/trunk/drivers/dahdi/xpp/firmwares/USB_FW.201.hex
- copied unchanged from r10596, linux/trunk/drivers/dahdi/xpp/firmwares/USB_FW.201.hex
freebsd/trunk/drivers/dahdi/xpp/firmwares/USB_RECOV.hex
- copied, changed from r10471, linux/trunk/drivers/dahdi/xpp/firmwares/USB_RECOV.hex
freebsd/trunk/drivers/dahdi/xpp/init_card_5_30
- copied unchanged from r10471, linux/trunk/drivers/dahdi/xpp/init_card_5_30
freebsd/trunk/include/linux/crc32.h (with props)
freebsd/trunk/include/linux/kref.h (with props)
freebsd/trunk/include/linux/ktime.h (with props)
freebsd/trunk/include/linux/mutex.h (with props)
freebsd/trunk/include/linux/pci_regs.h (with props)
freebsd/trunk/include/linux/time.h (with props)
Removed:
freebsd/trunk/drivers/dahdi/digits.h
freebsd/trunk/drivers/dahdi/wcte12xp/GpakHpi.h
freebsd/trunk/drivers/dahdi/xpp/xpp_log.h
Modified:
freebsd/trunk/ (props changed)
freebsd/trunk/Makefile
freebsd/trunk/bsd-kmod/Makefile
freebsd/trunk/bsd-kmod/dahdi-fw-oct6114-256.bin/Makefile
freebsd/trunk/bsd-kmod/dahdi-fw-te820.bin/Makefile
freebsd/trunk/bsd-kmod/dahdi-fw-vpmoct032.bin/Makefile
freebsd/trunk/bsd-kmod/dahdi/Makefile
freebsd/trunk/bsd-kmod/dahdi/bsd-compat.c
freebsd/trunk/bsd-kmod/dahdi/dahdi-bsd.c
freebsd/trunk/bsd-kmod/dahdi/ng_dahdi_iface.c
freebsd/trunk/build_tools/live_dahdi
freebsd/trunk/build_tools/make_version
freebsd/trunk/drivers/dahdi/Kbuild
freebsd/trunk/drivers/dahdi/dahdi-base.c
freebsd/trunk/drivers/dahdi/dahdi_dummy.c
freebsd/trunk/drivers/dahdi/dahdi_dynamic.c
freebsd/trunk/drivers/dahdi/dahdi_dynamic_eth.c
freebsd/trunk/drivers/dahdi/dahdi_dynamic_ethmf.c
freebsd/trunk/drivers/dahdi/dahdi_dynamic_loc.c
freebsd/trunk/drivers/dahdi/dahdi_echocan_jpah.c
freebsd/trunk/drivers/dahdi/dahdi_echocan_kb1.c
freebsd/trunk/drivers/dahdi/dahdi_echocan_mg2.c
freebsd/trunk/drivers/dahdi/dahdi_echocan_oslec.c
freebsd/trunk/drivers/dahdi/dahdi_echocan_sec.c
freebsd/trunk/drivers/dahdi/dahdi_echocan_sec2.c
freebsd/trunk/drivers/dahdi/dahdi_transcode.c
freebsd/trunk/drivers/dahdi/firmware/Makefile
freebsd/trunk/drivers/dahdi/fxo_modes.h
freebsd/trunk/drivers/dahdi/hpec/dahdi_echocan_hpec.c
freebsd/trunk/drivers/dahdi/oct612x/apilib/bt/ (props changed)
freebsd/trunk/drivers/dahdi/oct612x/apilib/largmath/ (props changed)
freebsd/trunk/drivers/dahdi/oct612x/apilib/llman/ (props changed)
freebsd/trunk/drivers/dahdi/oct612x/include/oct6100api/oct6100_channel_inst.h
freebsd/trunk/drivers/dahdi/oct612x/include/oct6100api/oct6100_chip_open_inst.h
freebsd/trunk/drivers/dahdi/oct612x/include/oct6100api/oct6100_defines.h
freebsd/trunk/drivers/dahdi/oct612x/include/octtype.h
freebsd/trunk/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/ (props changed)
freebsd/trunk/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_channel.c
freebsd/trunk/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_chip_open.c
freebsd/trunk/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_chip_stats.c
freebsd/trunk/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_conf_bridge.c
freebsd/trunk/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_events.c
freebsd/trunk/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_interrupts.c
freebsd/trunk/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_phasing_tsst.c
freebsd/trunk/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_playout_buf.c
freebsd/trunk/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_tlv.c
freebsd/trunk/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_miscellaneous_priv.h
freebsd/trunk/drivers/dahdi/pciradio.c
freebsd/trunk/drivers/dahdi/tor2-hw.h
freebsd/trunk/drivers/dahdi/tor2.c
freebsd/trunk/drivers/dahdi/voicebus/GpakCust.c
freebsd/trunk/drivers/dahdi/voicebus/GpakCust.h
freebsd/trunk/drivers/dahdi/voicebus/Kbuild
freebsd/trunk/drivers/dahdi/voicebus/voicebus.c
freebsd/trunk/drivers/dahdi/voicebus/voicebus.h
freebsd/trunk/drivers/dahdi/voicebus/voicebus_net.c
freebsd/trunk/drivers/dahdi/vpmadt032_loader/dahdi_vpmadt032_loader.c
freebsd/trunk/drivers/dahdi/wcb4xxp/base.c
freebsd/trunk/drivers/dahdi/wcb4xxp/wcb4xxp.h
freebsd/trunk/drivers/dahdi/wcfxo.c
freebsd/trunk/drivers/dahdi/wct1xxp.c
freebsd/trunk/drivers/dahdi/wct4xxp/Kbuild
freebsd/trunk/drivers/dahdi/wct4xxp/base.c
freebsd/trunk/drivers/dahdi/wct4xxp/vpm450m.c
freebsd/trunk/drivers/dahdi/wct4xxp/wct4xxp.h
freebsd/trunk/drivers/dahdi/wctc4xxp/base.c
freebsd/trunk/drivers/dahdi/wctdm.c
freebsd/trunk/drivers/dahdi/wctdm24xxp/base.c
freebsd/trunk/drivers/dahdi/wctdm24xxp/wctdm24xxp.h
freebsd/trunk/drivers/dahdi/wctdm24xxp/xhfc.c
freebsd/trunk/drivers/dahdi/wctdm24xxp/xhfc.h
freebsd/trunk/drivers/dahdi/wcte11xp.c
freebsd/trunk/drivers/dahdi/wcte12xp/base.c
freebsd/trunk/drivers/dahdi/wcte12xp/wcte12xp.h
freebsd/trunk/drivers/dahdi/xpp/Kbuild
freebsd/trunk/drivers/dahdi/xpp/card_bri.c
freebsd/trunk/drivers/dahdi/xpp/card_bri.h
freebsd/trunk/drivers/dahdi/xpp/card_fxo.c
freebsd/trunk/drivers/dahdi/xpp/card_fxo.h
freebsd/trunk/drivers/dahdi/xpp/card_fxs.c
freebsd/trunk/drivers/dahdi/xpp/card_fxs.h
freebsd/trunk/drivers/dahdi/xpp/card_global.c
freebsd/trunk/drivers/dahdi/xpp/card_global.h
freebsd/trunk/drivers/dahdi/xpp/card_pri.c
freebsd/trunk/drivers/dahdi/xpp/card_pri.h
freebsd/trunk/drivers/dahdi/xpp/dahdi_debug.c
freebsd/trunk/drivers/dahdi/xpp/dahdi_debug.h
freebsd/trunk/drivers/dahdi/xpp/firmwares/FPGA_1141.hex
freebsd/trunk/drivers/dahdi/xpp/firmwares/FPGA_1151.hex
freebsd/trunk/drivers/dahdi/xpp/firmwares/FPGA_1161.hex
freebsd/trunk/drivers/dahdi/xpp/firmwares/FPGA_FXS.hex
freebsd/trunk/drivers/dahdi/xpp/firmwares/Makefile
freebsd/trunk/drivers/dahdi/xpp/firmwares/PIC_TYPE_1.hex
freebsd/trunk/drivers/dahdi/xpp/firmwares/PIC_TYPE_2.hex
freebsd/trunk/drivers/dahdi/xpp/firmwares/USB_FW.hex
freebsd/trunk/drivers/dahdi/xpp/init_card_1_30
freebsd/trunk/drivers/dahdi/xpp/init_card_4_30
freebsd/trunk/drivers/dahdi/xpp/mmapbus.c
freebsd/trunk/drivers/dahdi/xpp/mmapdrv.c
freebsd/trunk/drivers/dahdi/xpp/parport_debug.c
freebsd/trunk/drivers/dahdi/xpp/parport_debug.h
freebsd/trunk/drivers/dahdi/xpp/print_fxo_modes.c
freebsd/trunk/drivers/dahdi/xpp/xbus-core.c
freebsd/trunk/drivers/dahdi/xpp/xbus-core.h
freebsd/trunk/drivers/dahdi/xpp/xbus-pcm.c
freebsd/trunk/drivers/dahdi/xpp/xbus-pcm.h
freebsd/trunk/drivers/dahdi/xpp/xbus-sysfs.c
freebsd/trunk/drivers/dahdi/xpp/xdefs.h
freebsd/trunk/drivers/dahdi/xpp/xframe_queue.c
freebsd/trunk/drivers/dahdi/xpp/xframe_queue.h
freebsd/trunk/drivers/dahdi/xpp/xpd.h
freebsd/trunk/drivers/dahdi/xpp/xpp_dahdi.c
freebsd/trunk/drivers/dahdi/xpp/xpp_dahdi.h
freebsd/trunk/drivers/dahdi/xpp/xpp_debug
freebsd/trunk/drivers/dahdi/xpp/xpp_usb.c
freebsd/trunk/drivers/dahdi/xpp/xproto.c
freebsd/trunk/drivers/dahdi/xpp/xproto.h
freebsd/trunk/firmware.mk
freebsd/trunk/include/asm/bug.h
freebsd/trunk/include/dahdi/dahdi_config.h
freebsd/trunk/include/dahdi/kernel.h
freebsd/trunk/include/dahdi/user.h
freebsd/trunk/include/dahdi/wctdm_user.h
freebsd/trunk/include/linux/compiler.h
freebsd/trunk/include/linux/completion.h
freebsd/trunk/include/linux/delay.h
freebsd/trunk/include/linux/device.h
freebsd/trunk/include/linux/firmware.h
freebsd/trunk/include/linux/fs.h
freebsd/trunk/include/linux/irqreturn.h
freebsd/trunk/include/linux/jiffies.h
freebsd/trunk/include/linux/kernel.h
freebsd/trunk/include/linux/module.h
freebsd/trunk/include/linux/pci.h
freebsd/trunk/include/linux/poll.h
freebsd/trunk/include/linux/sched.h
freebsd/trunk/include/linux/semaphore.h
freebsd/trunk/include/linux/slab.h
freebsd/trunk/include/linux/spinlock.h
freebsd/trunk/include/linux/stddef.h
freebsd/trunk/include/linux/timer.h
freebsd/trunk/include/linux/types.h
freebsd/trunk/include/linux/uaccess.h
freebsd/trunk/include/linux/workqueue.h
Propchange: freebsd/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Mar 26 12:40:58 2012
@@ -1,1 +1,1 @@
-/linux/trunk:7418-9205
+/linux/trunk:7418-10596
Modified: freebsd/trunk/Makefile
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/Makefile?view=diff&rev=10597&r1=10596&r2=10597
==============================================================================
--- freebsd/trunk/Makefile (original)
+++ freebsd/trunk/Makefile Mon Mar 26 12:40:58 2012
@@ -1,7 +1,7 @@
#
# Makefile for DAHDI Linux kernel modules
#
-# Copyright (C) 2001-2009 Digium, Inc.
+# Copyright (C) 2001-2010 Digium, Inc.
#
#
@@ -55,7 +55,7 @@
DAHDI_BUILD_ALL:=m
-KMAKE=$(MAKE) -C $(KSRC) SUBDIRS=$(PWD)/drivers/dahdi DAHDI_INCLUDE=$(PWD)/include DAHDI_MODULES_EXTRA="$(DAHDI_MODULES_EXTRA)" HOTPLUG_FIRMWARE=$(HOTPLUG_FIRMWARE)
+KMAKE=+$(MAKE) -C $(KSRC) SUBDIRS=$(PWD)/drivers/dahdi DAHDI_INCLUDE=$(PWD)/include DAHDI_MODULES_EXTRA="$(DAHDI_MODULES_EXTRA)" HOTPLUG_FIRMWARE=$(HOTPLUG_FIRMWARE)
ROOT_PREFIX:=
@@ -69,6 +69,10 @@
else
ifneq ($(wildcard .svn),)
DAHDIVERSION:=$(shell build_tools/make_version . dahdi/linux)
+else
+ifneq ($(wildcard .git),)
+ DAHDIVERSION:=$(shell build_tools/make_version . dahdi/linux)
+endif
endif
endif
Modified: freebsd/trunk/bsd-kmod/Makefile
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/bsd-kmod/Makefile?view=diff&rev=10597&r1=10596&r2=10597
==============================================================================
--- freebsd/trunk/bsd-kmod/Makefile (original)
+++ freebsd/trunk/bsd-kmod/Makefile Mon Mar 26 12:40:58 2012
@@ -5,7 +5,8 @@
dahdi\
dahdi_dynamic\
dahdi_transcode\
- dahdi_voicebus
+ dahdi_voicebus\
+ dahdi-fw-vpmoct032.bin
# dynamic drivers
SUBDIR+=\
@@ -40,7 +41,9 @@
wcte11xp\
wcte12xp\
dahdi-fw-oct6114-064.bin\
- dahdi-fw-oct6114-128.bin
+ dahdi-fw-oct6114-128.bin\
+ dahdi-fw-oct6114-256.bin\
+ dahdi-fw-te820.bin
# ISDN cards
SUBDIR+=\
Modified: freebsd/trunk/bsd-kmod/dahdi-fw-oct6114-256.bin/Makefile
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/bsd-kmod/dahdi-fw-oct6114-256.bin/Makefile?view=diff&rev=10597&r1=10471&r2=10597
==============================================================================
--- freebsd/trunk/bsd-kmod/dahdi-fw-oct6114-256.bin/Makefile (original)
+++ freebsd/trunk/bsd-kmod/dahdi-fw-oct6114-256.bin/Makefile Mon Mar 26 12:40:58 2012
@@ -1,11 +1,11 @@
# $Id$
-KMOD= dahdi-fw-oct6114-128.bin
-FIRMWS= dahdi-fw-oct6114-128.bin:dahdi-fw-oct6114-128.bin
-TARBALL= dahdi-fw-oct6114-128-${OCT6114_128_VERSION}.tar.gz
-CLEANFILES= dahdi-fw-oct6114-128.bin ${TARBALL}
+KMOD= dahdi-fw-oct6114-256.bin
+FIRMWS= dahdi-fw-oct6114-256.bin:dahdi-fw-oct6114-256.bin
+TARBALL= dahdi-fw-oct6114-256-${OCT6114_256_VERSION}.tar.gz
+CLEANFILES= dahdi-fw-oct6114-256.bin ${TARBALL}
-dahdi-fw-oct6114-128.bin:
+dahdi-fw-oct6114-256.bin:
${FETCH} -m ${FIRMWARE_URL}/${TARBALL}
${TAR} xvfz ${TARBALL}
Modified: freebsd/trunk/bsd-kmod/dahdi-fw-te820.bin/Makefile
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/bsd-kmod/dahdi-fw-te820.bin/Makefile?view=diff&rev=10597&r1=10471&r2=10597
==============================================================================
--- freebsd/trunk/bsd-kmod/dahdi-fw-te820.bin/Makefile (original)
+++ freebsd/trunk/bsd-kmod/dahdi-fw-te820.bin/Makefile Mon Mar 26 12:40:58 2012
@@ -1,11 +1,11 @@
# $Id$
-KMOD= dahdi-fw-hx8.bin
-FIRMWS= dahdi-fw-hx8.bin:dahdi-fw-hx8.bin
-TARBALL= dahdi-fw-hx8-${HX8_VERSION}.tar.gz
-CLEANFILES= dahdi-fw-hx8.bin ${TARBALL}
+KMOD= dahdi-fw-te820.bin
+FIRMWS= dahdi-fw-te820.bin:dahdi-fw-hx8.bin
+TARBALL= dahdi-fw-te820-${WCT820_VERSION}.tar.gz
+CLEANFILES= dahdi-fw-te820.bin ${TARBALL}
-dahdi-fw-hx8.bin:
+dahdi-fw-te820.bin:
${FETCH} -m ${FIRMWARE_URL}/${TARBALL}
${TAR} xvfz ${TARBALL}
Modified: freebsd/trunk/bsd-kmod/dahdi-fw-vpmoct032.bin/Makefile
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/bsd-kmod/dahdi-fw-vpmoct032.bin/Makefile?view=diff&rev=10597&r1=10471&r2=10597
==============================================================================
--- freebsd/trunk/bsd-kmod/dahdi-fw-vpmoct032.bin/Makefile (original)
+++ freebsd/trunk/bsd-kmod/dahdi-fw-vpmoct032.bin/Makefile Mon Mar 26 12:40:58 2012
@@ -1,11 +1,11 @@
# $Id$
-KMOD= dahdi-fw-hx8.bin
-FIRMWS= dahdi-fw-hx8.bin:dahdi-fw-hx8.bin
-TARBALL= dahdi-fw-hx8-${HX8_VERSION}.tar.gz
-CLEANFILES= dahdi-fw-hx8.bin ${TARBALL}
+KMOD= dahdi-fw-vpmoct032.bin
+FIRMWS= dahdi-fw-vpmoct032.bin:dahdi-fw-vpmoct032.bin
+TARBALL= dahdi-fw-vpmoct032-${VPMOCT032_VERSION}.tar.gz
+CLEANFILES= dahdi-fw-vpmoct032.bin ${TARBALL}
-dahdi-fw-hx8.bin:
+dahdi-fw-vpmoct032.bin:
${FETCH} -m ${FIRMWARE_URL}/${TARBALL}
${TAR} xvfz ${TARBALL}
Modified: freebsd/trunk/bsd-kmod/dahdi/Makefile
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/bsd-kmod/dahdi/Makefile?view=diff&rev=10597&r1=10596&r2=10597
==============================================================================
--- freebsd/trunk/bsd-kmod/dahdi/Makefile (original)
+++ freebsd/trunk/bsd-kmod/dahdi/Makefile Mon Mar 26 12:40:58 2012
@@ -3,7 +3,7 @@
.PATH: ${.CURDIR}/../../drivers/dahdi
KMOD= dahdi
-SRCS= dahdi-base.c dahdi-bsd.c ng_dahdi_iface.c
+SRCS= dahdi-base.c dahdi-version.c dahdi-bsd.c ng_dahdi_iface.c
SRCS+= bsd-compat.c
SRCS+= version.h
SRCS+= device_if.h bus_if.h pci_if.h
Modified: freebsd/trunk/bsd-kmod/dahdi/bsd-compat.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/bsd-kmod/dahdi/bsd-compat.c?view=diff&rev=10597&r1=10596&r2=10597
==============================================================================
--- freebsd/trunk/bsd-kmod/dahdi/bsd-compat.c (original)
+++ freebsd/trunk/bsd-kmod/dahdi/bsd-compat.c Mon Mar 26 12:40:58 2012
@@ -45,6 +45,8 @@
#include <linux/workqueue.h>
#include <sys/syscallsubr.h> /* kern_kldload() */
+#include <sys/refcount.h>
+#include <sys/sbuf.h>
SYSCTL_NODE(, OID_AUTO, dahdi, CTLFLAG_RW, 0, "DAHDI");
SYSCTL_NODE(_dahdi, OID_AUTO, echocan, CTLFLAG_RW, 0, "DAHDI Echo Cancelers");
@@ -93,6 +95,18 @@
tasklet_kill(struct tasklet_struct *t)
{
taskqueue_drain(taskqueue_fast, &t->task);
+}
+
+/*
+ * Time API
+ */
+struct timespec
+current_kernel_time(void)
+{
+ struct timespec ts;
+
+ getnanotime(&ts);
+ return ts;
}
/*
@@ -229,14 +243,17 @@
/*
* Semaphore API
*/
-void
-_sema_init(struct semaphore *s, int value)
+#undef sema_init
+#undef sema_destroy
+
+void
+_linux_sema_init(struct semaphore *s, int value)
{
sema_init(&s->sema, value, "DAHDI semaphore");
}
void
-_sema_destroy(struct semaphore *s)
+_linux_sema_destroy(struct semaphore *s)
{
sema_destroy(&s->sema);
}
@@ -266,14 +283,28 @@
sema_post(&s->sema);
}
+void
+_linux_sema_sysinit(struct semaphore *s)
+{
+ _linux_sema_init(s, 1);
+}
+
/*
* Workqueue API
*/
-void
+static void
_work_run(void *context, int pending)
{
struct work_struct *work = (struct work_struct *) context;
work->func(work);
+}
+
+void
+_linux_work_init(struct _linux_work_init_args *a)
+{
+ TASK_INIT(&a->work->task, 0, _work_run, a->work);
+ a->work->func = a->func;
+ a->work->tq = taskqueue_fast;
}
void
@@ -335,6 +366,73 @@
}
/*
+ * kref API
+ */
+void
+kref_set(struct kref *kref, int num)
+{
+ refcount_init(&kref->refcount, 1);
+}
+
+void
+kref_init(struct kref *kref)
+{
+ kref_set(kref, 1);
+}
+
+void
+kref_get(struct kref *kref)
+{
+ refcount_acquire(&kref->refcount);
+}
+
+int
+kref_put(struct kref *kref, void (*release) (struct kref *kref))
+{
+ if (refcount_release(&kref->refcount)) {
+ release(kref);
+ return 1;
+ }
+
+ return 0;
+}
+
+/*
+ * k[v]asprintf
+ */
+char *
+kvasprintf(gfp_t gfp, const char *fmt, va_list ap)
+{
+ struct sbuf *sb = sbuf_new_auto();
+ char *res;
+
+ sbuf_vprintf(sb, fmt, ap);
+ if (sbuf_finish(sb)) {
+ res = NULL;
+ } else {
+ int len = sbuf_len(sb);
+ res = kmalloc(len + 1, gfp);
+ if (res != NULL)
+ bcopy(sbuf_data(sb), res, len + 1);
+ }
+ sbuf_delete(sb);
+ return res;
+}
+
+char *
+kasprintf(gfp_t gfp, const char *fmt, ...)
+{
+ va_list ap;
+ char *res;
+
+ va_start(ap, fmt);
+ res = kvasprintf(gfp, fmt, ap);
+ va_end(ap);
+
+ return res;
+}
+
+/*
* Logging API
*/
int
@@ -349,6 +447,12 @@
/*
* Kernel module API
*/
+void
+__module_get(struct module *m)
+{
+ atomic_inc(&m->refcount);
+}
+
int
try_module_get(struct module *m)
{
@@ -417,7 +521,7 @@
* Firmware API
*/
int
-request_firmware(const struct firmware **firmware_p, const char *name, device_t *device)
+request_firmware(const struct firmware **firmware_p, const char *name, struct device *device)
{
*firmware_p = firmware_get(name);
return *firmware_p == NULL;
Modified: freebsd/trunk/bsd-kmod/dahdi/dahdi-bsd.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/bsd-kmod/dahdi/dahdi-bsd.c?view=diff&rev=10597&r1=10596&r2=10597
==============================================================================
--- freebsd/trunk/bsd-kmod/dahdi/dahdi-bsd.c (original)
+++ freebsd/trunk/bsd-kmod/dahdi/dahdi-bsd.c Mon Mar 26 12:40:58 2012
@@ -128,10 +128,10 @@
}
}
-struct pci_device_id *
-dahdi_pci_device_id_lookup(device_t dev, struct pci_device_id *tbl)
+const struct pci_device_id *
+dahdi_pci_device_id_lookup(device_t dev, const struct pci_device_id *tbl)
{
- struct pci_device_id *id;
+ const struct pci_device_id *id;
uint16_t vendor = pci_get_vendor(dev);
uint16_t device = pci_get_device(dev);
uint16_t subvendor = pci_get_subvendor(dev);
Modified: freebsd/trunk/bsd-kmod/dahdi/ng_dahdi_iface.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/bsd-kmod/dahdi/ng_dahdi_iface.c?view=diff&rev=10597&r1=10596&r2=10597
==============================================================================
--- freebsd/trunk/bsd-kmod/dahdi/ng_dahdi_iface.c (original)
+++ freebsd/trunk/bsd-kmod/dahdi/ng_dahdi_iface.c Mon Mar 26 12:40:58 2012
@@ -343,7 +343,6 @@
dahdi_net_chan_destroy(chan);
chan->iface = NULL;
- chan->flags &= ~DAHDI_FLAG_NETDEV;
}
/**
Modified: freebsd/trunk/build_tools/live_dahdi
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/build_tools/live_dahdi?view=diff&rev=10597&r1=10596&r2=10597
==============================================================================
--- freebsd/trunk/build_tools/live_dahdi (original)
+++ freebsd/trunk/build_tools/live_dahdi Mon Mar 26 12:40:58 2012
@@ -4,6 +4,7 @@
TOOLS_DIR=${TOOLS_DIR:=../dahdi-tools}
DYNAMIC_LOC="${DYNAMIC_LOC:-no}"
DESTDIR=$PWD/live
+LIVE_DAHDI_RSYNC_DIR=${LIVE_DAHDI_RSYNC_DIR:-/tmp/dahdi}
KVERS=${KVERS:-`uname -r`}
XPP_SYNC=${XPP_SYNC:-auto}
AST_SCRIPT=${AST_SCRIPT:-/etc/init.d/asterisk}
@@ -29,13 +30,16 @@
exit 1
fi
-if [ ! -d "$TOOLS_DIR" ]; then
- echo >&2 "$0:dahdi-tools dir '$TOOLS_DIR' does not exits. Aborting".
- exit 1
-fi
set -e
LINUX_DIR_FULL=`(cd $LINUX_DIR; pwd)`
-TOOLS_DIR_FULL=`(cd $TOOLS_DIR; pwd)`
+
+set_tools_dir() {
+ if [ ! -d "$TOOLS_DIR" ]; then
+ echo >&2 "$0:dahdi-tools dir '$TOOLS_DIR' does not exits. Aborting".
+ exit 1
+ fi
+ TOOLS_DIR_FULL=`(cd $TOOLS_DIR; pwd)`
+}
# Give priority to our installed binaries:
PATH=$DESTDIR/sbin:$DESTDIR/usr/sbin:$PATH
@@ -84,6 +88,9 @@
MODULES_LOAD="$MODULES_LOAD xpp/xpd_fxo xpp/xpd_pri"
if [ -r "$MODULES_DIR/xpp/xpd_bri.ko" ]; then
MODULES_LOAD="$MODULES_LOAD xpp/xpd_bri"
+ fi
+ if [ -r "$MODULES_DIR/xpp/xpd_echo.ko" ]; then
+ MODULES_LOAD="$MODULES_LOAD xpp/xpd_echo"
fi
MODULES_LOAD="$MODULES_LOAD xpp/xpp_usb"
;;
@@ -217,6 +224,7 @@
echo "$me xpp-firm (Reset and load xpp firmware)"
echo "$me genconf dahdi_genconf; dahdi_cfg"
echo "$me asterisk /etc/init.d/asterisk start"
+ echo "$me symlink_ast symlink dahdi-channels.conf"
echo "$me rsync TARGET (copy filea to /tmp/live in host TARGET)"
echo "$me exec COMMAND (Run COMMAND in 'live' environment)"
echo ""
@@ -227,15 +235,18 @@
case "$1" in
configure)
shift
+ set_tools_dir
cd "$TOOLS_DIR"; ./configure --with-dahdi="$LINUX_DIR_FULL" "$@"
;;
install)
shift
+ set_tools_dir
cd "$LINUX_DIR"; make install DESTDIR=$DESTDIR "$@"
cd "$TOOLS_DIR_FULL"; make install DESTDIR=$DESTDIR DYNFS=yes "$@"
;;
config)
shift
+ set_tools_dir
cd "$TOOLS_DIR"; make config DESTDIR=$DESTDIR "$@"
mkdir -p $DESTDIR/etc/asterisk
cat >"$FIRMWARE_DIR/live-init.conf" <<EOF
@@ -244,6 +255,7 @@
dahdiconfdir="${DESTDIR}/etc/dahdi"
export dahdiconfdir
EOF
+ ln -s ../../../etc/dahdi/xpp.conf "$DESTDIR/usr/share/dahdi/"
;;
rsync)
if [ $# -ne 2 ]; then
@@ -252,7 +264,7 @@
fi
# copy the script itself and the installed directory to the
# target host:
- rsync -ai "$0" $DESTDIR "$2:/tmp/"
+ rsync -ai "$0" $DESTDIR "$2:$LIVE_DAHDI_RSYNC_DIR"
;;
unload)
# OK for Asterisk not to be running. TODO: a better test?
@@ -281,12 +293,19 @@
# TODO: A local copy of Asterisk, configured with dahdi_gnconf.
# doable, but trickier.
run_asterisk
+ if [ "$LIVE_DAHDI_FREEPBXDB" = 'yes' ]; then
+ GENCONF_PARAMETERS=$DESTDIR/etc/dahdi/genconf_parameters \
+ dahdi_genconf freepbxdb
+ fi
;;
genconf)
genconf
;;
asterisk)
run_asterisk
+ ;;
+symlink_ast)
+ ln -sf "$DESTDIR/etc/asterisk/dahdi-channels.conf" /etc/asterisk/
;;
reload)
$0 unload
@@ -311,6 +330,7 @@
"$FIRMWARE_DIR/xpp_fxloader" reset
sleep 5
XPP_FIRMWARE_DIR=$FIRMWARE_DIR \
+ XPP_CONFIG="$DESTDIR/etc/dahdi/xpp.conf" \
"$FIRMWARE_DIR/xpp_fxloader" load
;;
help|'')
Modified: freebsd/trunk/build_tools/make_version
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/build_tools/make_version?view=diff&rev=10597&r1=10596&r2=10597
==============================================================================
--- freebsd/trunk/build_tools/make_version (original)
+++ freebsd/trunk/build_tools/make_version Mon Mar 26 12:40:58 2012
@@ -53,4 +53,66 @@
done
echo SVN-${RESULT##-}-r${REV}
+elif [ -d ${1}/.git ]; then
+ # If the first log commit messages indicates that this is checked into
+ # subversion, we'll just use the SVN- form of the revision.
+ MODIFIED=""
+ SVN_REV=`git log --pretty=full -1 | grep -F "git-svn-id:" | sed -e "s/.*\@\([^\s]*\)\s.*/\1/g"`
+ if [ -z "$SVN_REV" ]; then
+ VERSION=`git describe --long --always --tags --dirty=M 2> /dev/null`
+ if [ $? -ne 0 ]; then
+ if [ "`git ls-files -m | wc -l`" != "0" ]; then
+ MODIFIED="M"
+ fi
+ # Some older versions of git do not support all the above
+ # options.
+ VERSION=GIT-`git rev-parse --short --verify HEAD`${MODIFIED}
+ fi
+ echo ${VERSION}
+ else
+ PARTS=`LANG=C git log --pretty=full | grep -F "git-svn-id:" | head -1 | awk '{print $2;}' | sed -e s:^.*/svn/$2/:: | sed -e 's:/: :g' | sed -e 's/@.*$//g'`
+ BRANCH=0
+ TEAM=0
+
+ if [ "`git ls-files -m | wc -l`" != "0" ]; then
+ MODIFIED="M"
+ fi
+
+ if [ "${PARTS}" = "trunk" ]; then
+ echo SVN-'trunk'-r${SVN_REV}${MODIFIED}
+ exit 0
+ fi
+
+ for PART in $PARTS
+ do
+ if [ ${BRANCH} != 0 ]; then
+ RESULT="${RESULT}-${PART}"
+ break
+ fi
+
+ if [ ${TEAM} != 0 ]; then
+ RESULT="${RESULT}-${PART}"
+ continue
+ fi
+
+ if [ "${PART}" = "branches" ]; then
+ BRANCH=1
+ RESULT="branch"
+ continue
+ fi
+
+ if [ "${PART}" = "tags" ]; then
+ BRANCH=1
+ RESULT="tag"
+ continue
+ fi
+
+ if [ "${PART}" = "team" ]; then
+ TEAM=1
+ continue
+ fi
+ done
+
+ echo SVN-${RESULT##-}-r${SVN_REV}${MODIFIED}
+ fi
fi
Modified: freebsd/trunk/drivers/dahdi/Kbuild
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/Kbuild?view=diff&rev=10597&r1=10596&r2=10597
==============================================================================
--- freebsd/trunk/drivers/dahdi/Kbuild (original)
+++ freebsd/trunk/drivers/dahdi/Kbuild Mon Mar 26 12:40:58 2012
@@ -6,6 +6,7 @@
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_DYNAMIC_ETHMF) += dahdi_dynamic_ethmf.o
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_TRANSCODE) += dahdi_transcode.o
+ifdef CONFIG_PCI
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCT4XXP) += wct4xxp/
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTC4XXP) += wctc4xxp/
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTDM24XXP) += wctdm24xxp/
@@ -20,6 +21,7 @@
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCFXO) += wcfxo.o
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_TOR2) += tor2.o
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_PCIRADIO) += pciradio.o
+endif
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_XPP) += xpp/
@@ -31,14 +33,13 @@
obj-m += $(DAHDI_MODULES_EXTRA)
-# Only enable this if you think you know what you're doing. This is not
-# supported yet:
-#obj-m += dahdi_echocan_oslec.o
-#
-# A quick and dirty way to build OSLEC, if you happened to place it
-# yourself in the dahdi source tree. This is experimental. See README
-# regarding OSLEC.
-#obj-m += ../staging/echo/
+# If you want to build OSLEC, include the code in the standard location:
+# drivers/staging/echo . The DAHDI OSLEC echo canceller will be built as
+# well:
+ifneq (,$(wildcard $(src)/../staging/echo/echo.c))
+obj-m += dahdi_echocan_oslec.o
+obj-m += ../staging/echo/
+endif
CFLAGS_MODULE += -I$(DAHDI_INCLUDE) -I$(src)
@@ -76,7 +77,7 @@
endif
endif
-dahdi-objs := dahdi-base.o
+dahdi-objs := dahdi-base.o dahdi-sysfs.o dahdi-sysfs-chan.o dahdi-version.o
###############################################################################
# Find appropriate ARCH value for VPMADT032 and HPEC binary modules
@@ -135,7 +136,7 @@
$(obj)/pciradio.o: $(obj)/radfw.h
$(obj)/tor2.o: $(obj)/tor2fw.h
-hostprogs-y := $(obj)/makefw
+hostprogs-y := makefw
$(obj)/tor2fw.h: $(src)/tormenta2.rbt $(obj)/makefw
$(obj)/makefw $< tor2fw > $@
@@ -143,7 +144,4 @@
$(obj)/radfw.h: $(src)/pciradio.rbt $(obj)/makefw
$(obj)/makefw $< radfw > $@
-$(obj)/makefw: $(src)/makefw.c
- $(HOSTCC) -o $@ $^
-
clean-files := radfw.h tor2fw.h
Modified: freebsd/trunk/drivers/dahdi/dahdi-base.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=10597&r1=10596&r2=10597
==============================================================================
--- freebsd/trunk/drivers/dahdi/dahdi-base.c (original)
+++ freebsd/trunk/drivers/dahdi/dahdi-base.c Mon Mar 26 12:40:58 2012
@@ -15,7 +15,7 @@
* from Cisco 3620 to IBM x305 here in F1 Group
*
* Copyright (C) 2001 Jim Dixon / Zapata Telephony.
- * Copyright (C) 2001 - 2010 Digium, Inc.
+ * Copyright (C) 2001 - 2012 Digium, Inc.
*
* All rights reserved.
*
@@ -34,14 +34,15 @@
* this program for more details.
*/
+
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/module.h>
#if defined(__FreeBSD__)
#include <linux/slab.h> /* linux/proc_fs.h */
-#include <sys/filio.h>
#else
#include <linux/proc_fs.h>
+#include <linux/seq_file.h>
#endif
#include <linux/pci.h>
#include <linux/init.h>
@@ -51,8 +52,10 @@
#include <linux/moduleparam.h>
#include <linux/sched.h>
#include <linux/list.h>
-
-#ifdef HAVE_UNLOCKED_IOCTL
+#include <linux/delay.h>
+#include <linux/mutex.h>
+
+#if defined(HAVE_UNLOCKED_IOCTL) && defined(CONFIG_BKL)
#include <linux/smp_lock.h>
#endif
@@ -60,20 +63,13 @@
#include <asm/atomic.h>
-#include <dahdi/version.h>
-
-#define module_printk(level, fmt, args...) printk(level "%s: " fmt, THIS_MODULE->name, ## args)
-
-/* #define BUF_MUNGE */
+#define DAHDI_PRINK_MACROS_USE_debug
/* Grab fasthdlc with tables */
#define FAST_HDLC_NEED_TABLES
#include <dahdi/kernel.h>
#include "ecdis.h"
-
-#ifndef CONFIG_OLD_HDLC_API
-#define NEW_HDLC_INTERFACE
-#endif
+#include "dahdi.h"
#ifdef CONFIG_DAHDI_PPP
#include <linux/netdevice.h>
@@ -93,29 +89,26 @@
#error "You cannot define both EMPULSE and EMFLASH"
#endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
+#ifndef CONFIG_BKL
+#warning "No CONFIG_BKL is an experimental configuration."
+#endif
+#endif
+
/* Get helper arithmetic */
#include "arith.h"
#if defined(CONFIG_DAHDI_MMX) || defined(ECHO_CAN_FP)
#include <asm/i387.h>
#endif
-#define hdlc_to_ztchan(h) (((struct dahdi_hdlc *)(h))->chan)
-#define dev_to_ztchan(h) (((struct dahdi_hdlc *)(dev_to_hdlc(h)->priv))->chan)
-#define ztchan_to_dev(h) ((h)->hdlcnetdev->netdev)
-
-/* names of tx level settings */
-static char *dahdi_txlevelnames[] = {
-"0 db (CSU)/0-133 feet (DSX-1)",
-"133-266 feet (DSX-1)",
-"266-399 feet (DSX-1)",
-"399-533 feet (DSX-1)",
-"533-655 feet (DSX-1)",
-"-7.5db (CSU)",
-"-15db (CSU)",
-"-22.5db (CSU)"
-} ;
+#define hdlc_to_chan(h) (((struct dahdi_hdlc *)(h))->chan)
+#define netdev_to_chan(h) (((struct dahdi_hdlc *)(dev_to_hdlc(h)->priv))->chan)
+#define chan_to_netdev(h) ((h)->hdlcnetdev->netdev)
#if defined(__FreeBSD__)
+#include <sys/filio.h>
+#include <sys/proc.h>
+
#include "ng_dahdi_iface.h"
/*
@@ -126,6 +119,10 @@
#define __copy_from_user(to, from, n) (bcopy((from), (to), (n)), 0)
#define __copy_to_user(to, from, n) (bcopy((from), (to), (n)), 0)
+#define signal_pending(current) (0)
+
+#define POLLRDHUP 0
+
#define MODULE_PARAM_PREFIX "dahdi"
#define MODULE_PARAM_PARENT _dahdi
@@ -135,122 +132,6 @@
#define UNIT(file) dev2unit(file->dev)
-struct dahdi_fp {
- int fflags; /**< file flags */
- void *private_data; /**< private data */
-};
-
-static void
-dahdi_fp_free(void *fp)
-{
- free(fp, M_DAHDI);
-}
-
-static int
-dahdi_get_fp(struct cdev *dev, struct dahdi_fp **pfp)
-{
- int error = devfs_get_cdevpriv((void **) pfp);
- if (error == ENOENT) {
- *pfp = malloc(sizeof(struct dahdi_fp), M_DAHDI, M_NOWAIT | M_ZERO);
- if (*pfp == NULL)
- return -ENOMEM;
-
- error = devfs_set_cdevpriv(*pfp, dahdi_fp_free);
- if (error) {
- dahdi_fp_free(*pfp);
- return -ENXIO;
- }
- } else if (error) {
- return (error);
- }
-
- return 0;
-}
-
-void *
-dahdi_get_private_data(struct file *file)
-{
- int error;
- struct dahdi_fp *fp;
-
- error = devfs_get_cdevpriv((void **) &fp);
- if (error || fp == NULL)
- return NULL;
-
- return fp->private_data;
-}
-
-void
-dahdi_set_private_data(struct file *file, void *private_data)
-{
- int error;
- struct dahdi_fp *fp;
-
- error = dahdi_get_fp(file->dev, &fp);
- if (error)
- return;
-
- fp->private_data = private_data;
-}
-
-static int
-dahdi_chan_is_nonblocking(struct dahdi_chan *chan)
-{
- return chan->file && (chan->file_flags & O_NONBLOCK);
-}
-
-static void
-handle_selwakeup(void *context, int pending)
-{
- struct selinfo *selinfo = context;
- selwakeup(selinfo);
-}
-
-static void
-dahdi_poll_init(struct pollinfo *sel)
-{
- TASK_INIT(&sel->task, 0, handle_selwakeup, &sel->selinfo);
-}
-
-void
-dahdi_poll_wait(struct file *file, struct pollinfo *sel, struct poll_table_struct *wait_table)
-{
- wait_table->selinfo = &sel->selinfo;
-}
-
-static void
-dahdi_poll_wakeup(struct pollinfo *sel)
-{
- taskqueue_enqueue_fast(taskqueue_fast, &sel->task);
-}
-
-static void
-dahdi_poll_drain(struct pollinfo *sel)
-{
- taskqueue_drain(taskqueue_fast, &sel->task);
-}
-
-/* sleep in user space until woken up. Equivilant of tsleep() in BSD */
-int
-dahdi_schluffen(wait_queue_head_t *q)
-{
- int rc = tsleep(q, PZERO | PCATCH, "schluffen", 10);
- switch (rc) {
- case EINTR:
- case ERESTART:
- return -rc;
- }
- return 0;
-}
-
-#ifdef CONFIG_DAHDI_CORE_TIMER
-static inline void
-dahdi_get_current_time(struct timespec *ts)
-{
- getnanotime(ts);
-}
-#endif
-
static int
dahdi_fop_read(FOP_READ_ARGS_DECL, int off, void *buf, int iocount)
{
@@ -269,9 +150,11 @@
return -copyin(from, to, n);
}
+struct pseudo_chan;
+
struct pseudo_free {
LIST_ENTRY(pseudo_free) pf_link;
- struct dahdi_chan *pf_pseudo;
+ struct pseudo_chan *pf_pseudo;
struct thread *pf_thread;
};
@@ -281,7 +164,7 @@
LIST_HEAD_INITIALIZER(pseudo_free_list);
static void
-free_pseudo(struct dahdi_chan *pseudo)
+free_pseudo(struct pseudo_chan *pseudo)
{
unsigned long flags;
struct pseudo_free *pf;
@@ -314,6 +197,9 @@
}
spin_unlock_irqrestore(&pseudo_free_list_lock, flags);
}
+
+static int dahdi_span_register_chardev(struct dahdi_span *span);
+static void dahdi_span_unregister_chardev(struct dahdi_span *span);
#else /* !__FreeBSD__ */
#define FOP_READ_ARGS_DECL struct file *file, char __user *usrbuf, size_t count, loff_t *ppos
#define FOP_READ_ARGS file, usrbuf, count, ppos
@@ -323,73 +209,6 @@
/* macro-oni for determining a unit (channel) number */
#define UNIT(file) MINOR(file->f_dentry->d_inode->i_rdev)
-void *
-dahdi_get_private_data(struct file *file)
-{
- return file->private_data;
-}
-
-void
-dahdi_set_private_data(struct file *file, void *private_data)
-{
- file->private_data = private_data;
-}
-
-static int
-dahdi_chan_is_nonblocking(struct dahdi_chan *chan)
-{
- return chan->file && (chan->file->f_flags & O_NONBLOCK);
-}
-
-static void
-dahdi_poll_init(struct pollinfo *sel)
-{
- init_wait_queue_head(&sel->wait_queue);
-}
-
-void
-dahdi_poll_wait(struct file *file, struct pollinfo *sel, struct poll_table_struct *wait_table)
-{
- poll_wait(file, &sel->wait_queue, wait_table);
-}
-
-static void
-dahdi_poll_wakeup(struct pollinfo *sel)
-{
- wake_up_interruptible(&sel->wait_queue);
-}
-
-#define dahdi_poll_drain(sel)
-
-/* sleep in user space until woken up. Equivilant of tsleep() in BSD */
-static int
-dahdi_schluffen(wait_queue_head_t *q)
-{
- DECLARE_WAITQUEUE(wait, current);
-
- add_wait_queue(q, &wait);
- current->state = TASK_INTERRUPTIBLE;
-
- if (!signal_pending(current))
- schedule();
-
- current->state = TASK_RUNNING;
- remove_wait_queue(q, &wait);
-
- if (signal_pending(current))
- return -ERESTARTSYS;
-
- return 0;
-}
-
-#ifdef CONFIG_DAHDI_CORE_TIMER
-static inline void
-dahdi_get_current_time(struct timespec *ts)
-{
- *ts = kernel_current_time();
-}
-#endif
-
static int
dahdi_fop_read(FOP_READ_ARGS_DECL, int off, void *buf, int iocount)
{
@@ -406,38 +225,11 @@
dahdi_copy_from_user(void *to, const void __user *from, int n)
{
return copy_from_user(to, from, n);
-}
-
-int
-dahdi_register_chardev(struct dahdi_chardev *dev)
-{
- static const char *DAHDI_STRING = "dahdi!";
- char *udevname;
-
- udevname = kzalloc(strlen(dev->name) + sizeof(DAHDI_STRING) + 1,
- GFP_KERNEL);
- if (!udevname)
- return -ENOMEM;
-
- strcpy(udevname, DAHDI_STRING);
- strcat(udevname, dev->name);
- CLASS_DEV_CREATE(dahdi_class, MKDEV(DAHDI_MAJOR, dev->minor), NULL, udevname);
- kfree(udevname);
- return 0;
-}
-
-int
-dahdi_unregister_chardev(struct dahdi_chardev *dev)
-{
- CLASS_DEV_DESTROY(dahdi_class, MKDEV(DAHDI_MAJOR, dev->minor));
- return 0;
}
EXPORT_SYMBOL(dahdi_transcode_fops);
EXPORT_SYMBOL(dahdi_init_tone_state);
EXPORT_SYMBOL(dahdi_mf_tone);
-EXPORT_SYMBOL(dahdi_register);
-EXPORT_SYMBOL(dahdi_unregister);
EXPORT_SYMBOL(__dahdi_mulaw);
EXPORT_SYMBOL(__dahdi_alaw);
#ifdef CONFIG_CALC_XLAW
@@ -447,24 +239,17 @@
EXPORT_SYMBOL(__dahdi_lin2mu);
EXPORT_SYMBOL(__dahdi_lin2a);
#endif
-EXPORT_SYMBOL(dahdi_lboname);
-EXPORT_SYMBOL(dahdi_transmit);
-EXPORT_SYMBOL(dahdi_receive);
EXPORT_SYMBOL(dahdi_rbsbits);
EXPORT_SYMBOL(dahdi_qevent_nolock);
EXPORT_SYMBOL(dahdi_qevent_lock);
EXPORT_SYMBOL(dahdi_hooksig);
EXPORT_SYMBOL(dahdi_alarm_notify);
EXPORT_SYMBOL(dahdi_set_dynamic_ioctl);
-EXPORT_SYMBOL(dahdi_ec_chunk);
-EXPORT_SYMBOL(dahdi_ec_span);
EXPORT_SYMBOL(dahdi_hdlc_abort);
EXPORT_SYMBOL(dahdi_hdlc_finish);
EXPORT_SYMBOL(dahdi_hdlc_getbuf);
EXPORT_SYMBOL(dahdi_hdlc_putbuf);
EXPORT_SYMBOL(dahdi_alarm_channel);
-EXPORT_SYMBOL(dahdi_register_chardev);
-EXPORT_SYMBOL(dahdi_unregister_chardev);
EXPORT_SYMBOL(dahdi_register_echocan_factory);
EXPORT_SYMBOL(dahdi_unregister_echocan_factory);
@@ -472,54 +257,17 @@
EXPORT_SYMBOL(dahdi_set_hpec_ioctl);
#ifdef CONFIG_PROC_FS
-static struct proc_dir_entry *proc_entries[DAHDI_MAX_SPANS];
-#endif
-
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
-#define CLASS_DEV_CREATE(class, devt, device, name) \
- device_create(class, device, devt, NULL, "%s", name)
-#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
-#define CLASS_DEV_CREATE(class, devt, device, name) \
- device_create(class, device, devt, name)
-#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
-#define CLASS_DEV_CREATE(class, devt, device, name) \
- class_device_create(class, NULL, devt, device, name)
-#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
-#define CLASS_DEV_CREATE(class, devt, device, name) \
- class_device_create(class, devt, device, name)
-#else
-#define CLASS_DEV_CREATE(class, devt, device, name) \
- class_simple_device_add(class, devt, device, name)
-#endif
-
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
-#define CLASS_DEV_DESTROY(class, devt) \
- device_destroy(class, devt)
-#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
-#define CLASS_DEV_DESTROY(class, devt) \
- class_device_destroy(class, devt)
-#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,9)
-#define CLASS_DEV_DESTROY(class, devt) \
- class_simple_device_remove(devt)
-#else
-#define CLASS_DEV_DESTROY(class, devt) \
- class_simple_device_remove(class, devt)
-#endif
-
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
-static struct class *dahdi_class = NULL;
-#else
-static struct class_simple *dahdi_class = NULL;
-#define class_create class_simple_create
-#define class_destroy class_simple_destroy
[... 72500 lines stripped ...]
More information about the svn-commits
mailing list