diff options
author | lawrance <lawrance@FreeBSD.org> | 2005-11-11 18:06:14 +0800 |
---|---|---|
committer | lawrance <lawrance@FreeBSD.org> | 2005-11-11 18:06:14 +0800 |
commit | 447fa11b52b08233f3f4ffe5a0aee8691be27226 (patch) | |
tree | d327d289540c927e7b3760d3605be711bec74984 /comms | |
parent | c9b2c4b95935ca1c4c53eb2a0057eddce9a8d92d (diff) | |
download | freebsd-ports-gnome-447fa11b52b08233f3f4ffe5a0aee8691be27226.tar.gz freebsd-ports-gnome-447fa11b52b08233f3f4ffe5a0aee8691be27226.tar.zst freebsd-ports-gnome-447fa11b52b08233f3f4ffe5a0aee8691be27226.zip |
Add vpb-driver 2.4.9, device-driver for the Voicetronix OpenLine4 PCI
telephony cards.
This is a port of the 4.x driver from the vendor, for 5.x.
PR: ports/77471
Submitted by: Chris Forkin <chris@forkin.com>
Diffstat (limited to 'comms')
-rw-r--r-- | comms/Makefile | 1 | ||||
-rw-r--r-- | comms/vpb-driver/Makefile | 42 | ||||
-rw-r--r-- | comms/vpb-driver/distinfo | 2 | ||||
-rw-r--r-- | comms/vpb-driver/files/patch-FreeBSD-Makefile | 8 | ||||
-rw-r--r-- | comms/vpb-driver/files/patch-FreeBSD-vpb.c | 239 | ||||
-rw-r--r-- | comms/vpb-driver/files/patch-Makefile | 48 | ||||
-rw-r--r-- | comms/vpb-driver/files/patch-src-comm.cpp | 38 | ||||
-rw-r--r-- | comms/vpb-driver/files/patch-src-genericfreebsd.cpp | 43 | ||||
-rw-r--r-- | comms/vpb-driver/files/patch-src-hip.cpp | 48 | ||||
-rw-r--r-- | comms/vpb-driver/files/patch-src-vpbapi.cpp | 20 | ||||
-rw-r--r-- | comms/vpb-driver/files/patch-src-vpbapi.h | 11 | ||||
-rw-r--r-- | comms/vpb-driver/files/patch-src-vpbreg.cpp | 15 | ||||
-rw-r--r-- | comms/vpb-driver/files/pkg-message.in | 34 | ||||
-rw-r--r-- | comms/vpb-driver/files/vpb.sh.in | 46 | ||||
-rw-r--r-- | comms/vpb-driver/pkg-descr | 9 | ||||
-rw-r--r-- | comms/vpb-driver/pkg-plist | 8 |
16 files changed, 612 insertions, 0 deletions
diff --git a/comms/Makefile b/comms/Makefile index 81606725a7be..856eba1d7c61 100644 --- a/comms/Makefile +++ b/comms/Makefile @@ -102,6 +102,7 @@ SUBDIR += trustedqsl SUBDIR += twpsk SUBDIR += viewfax + SUBDIR += vpb-driver SUBDIR += vpb2 SUBDIR += vrflash SUBDIR += wwl diff --git a/comms/vpb-driver/Makefile b/comms/vpb-driver/Makefile new file mode 100644 index 000000000000..b1622eb06dd8 --- /dev/null +++ b/comms/vpb-driver/Makefile @@ -0,0 +1,42 @@ +# New ports collection makefile for: vpb-driver +# Date created: 11 Feb 2005 +# Whom: Chris Forkin <chris@forkin.com> +# +# $FreeBSD$ +# + +PORTNAME= vpb-driver +PORTVERSION= 2.4.9 +CATEGORIES= comms +MASTER_SITES= http://www.voicetronix.com/Downloads/ + +MAINTAINER= chris@forkin.com +COMMENT= Device-driver for the Voicetronix OpenLine4 PCI telephony cards + +USE_GMAKE= yes +USE_REINPLACE= yes +USE_RC_SUBR= vpb.sh +SUB_FILES+= pkg-message +PKGMESSAGE= ${WRKDIR}/pkg-message +MAKE_ENV+= KMODDIR=${PREFIX}/lib + +SED_SCRIPT= -e 's,%%PREFIX%%,${PREFIX},g' \ + -e 's,%%DOCSDIR%%,${DOCSDIR},g' \ + -e 's,%%DATADIR%%,${DATADIR},g' \ + -e 's,%%EXAMPLESDIR%%,${EXAMPLESDIR},g' \ + -e 's,%%RC_SUBR%%,${RC_SUBR},g' \ + +.include <bsd.port.pre.mk> + +.if ${OSVERSION} < 502000 || ${OSVERSION} >= 600000 +IGNORE= is not for FreeBSD versions < 502000, or >= 600000 +.endif + +do-configure: + @${REINPLACE_CMD} -E ${SED_SCRIPT} ${WRKSRC}/src/vpbreg.cpp + +post-install: + @${RM} -f ${PREFIX}/etc/rc.d/vpb.sh.sample.bak 2>/dev/null + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.post.mk> diff --git a/comms/vpb-driver/distinfo b/comms/vpb-driver/distinfo new file mode 100644 index 000000000000..2d53d362e379 --- /dev/null +++ b/comms/vpb-driver/distinfo @@ -0,0 +1,2 @@ +MD5 (vpb-driver-2.4.9.tar.gz) = 7c6240af9d97f18bb58f5904ec560839 +SIZE (vpb-driver-2.4.9.tar.gz) = 863416 diff --git a/comms/vpb-driver/files/patch-FreeBSD-Makefile b/comms/vpb-driver/files/patch-FreeBSD-Makefile new file mode 100644 index 000000000000..507900f225c2 --- /dev/null +++ b/comms/vpb-driver/files/patch-FreeBSD-Makefile @@ -0,0 +1,8 @@ +--- FreeBSD/Makefile Thu Jan 1 10:00:00 1970 ++++ FreeBSD/Makefile Fri Feb 11 16:21:52 2005 +@@ -0,0 +1,5 @@ ++SRCS=vpb.c ++SRCS+=bus_if.h device_if.h pci_if.h ++KMOD=vpb ++ ++.include <bsd.kmod.mk> diff --git a/comms/vpb-driver/files/patch-FreeBSD-vpb.c b/comms/vpb-driver/files/patch-FreeBSD-vpb.c new file mode 100644 index 000000000000..e94ea3a2da68 --- /dev/null +++ b/comms/vpb-driver/files/patch-FreeBSD-vpb.c @@ -0,0 +1,239 @@ +--- FreeBSD/vpb.c Mon May 3 13:49:58 2004 ++++ FreeBSD/vpb.c Mon Mar 14 10:47:29 2005 +@@ -52,8 +52,6 @@ + #define BLOCK_DELAY 1 /* delay (us) between adjacent blocks */ + #define SIZE_LCR 128 /* size of 9050 local config reg space in bytes */ + +-#define MIN(a,b) (((a) < (b)) ? (a) : (b)) +- + #define EEPROM_SIZE 64 + #define EEPROM_CS 25 /* Chip select bit */ + #define EEPROM_CLK 24 +@@ -68,16 +66,20 @@ + + #include <sys/types.h> + #include <sys/module.h> +-#include <sys/systm.h> /* uprintf */ ++#include <sys/systm.h> /* uprintf */ + #include <sys/errno.h> +-#include <sys/param.h> /* defines used in kernel.h */ +-#include <sys/kernel.h> /* types used in module initialization */ +-#include <sys/conf.h> /* cdevsw struct */ +-#include <sys/uio.h> /* uio struct */ ++#include <sys/param.h> /* defines used in kernel.h */ ++#include <sys/kernel.h> /* types used in module initialization */ ++#include <sys/conf.h> /* cdevsw struct */ ++#include <sys/uio.h> /* uio struct */ + #include <sys/malloc.h> +-#include <sys/bus.h> /* structs, prototypes for pci bus stuff */ +-#include <pci/pcivar.h> /* For get_pci macros! */ +-#include <sys/vpbio.h> /* IOCTL definitions */ ++#include <sys/bus.h> /* structs, prototypes for pci bus stuff */ ++#if __FreeBSD_version > 500000 ++#include <dev/pci/pcivar.h> /* For get_pci macros! */ ++#else ++#include <pci/pcivar.h> /* For get_pci macros! */ ++#endif ++#include "vpbio.h" /* IOCTL definitions */ + #include <machine/clock.h> + #include <vm/vm.h> + #include <vm/pmap.h> +@@ -113,26 +115,34 @@ + \*---------------------------------------------------------------------------*/ + + /* Character device entry points */ +- ++#if __FreeBSD_version > 500000 ++#if __FreeBSD_version > 503000 ++#define DEV_T struct cdev* ++#else ++#define DEV_T dev_t ++#endif ++#define D_THREAD_T thread ++#define CDEV_MAJOR MAJOR_AUTO /* reserved for local use */ ++#else ++#define DEV_T dev_t ++#define D_THREAD_T proc ++#define CDEV_MAJOR 33 /* reserved for lkms */ ++#endif + static struct cdevsw vpb_cdevsw = { +- vpb_open, +- vpb_close, +- vpb_read, +- vpb_write, +- vpb_ioctl, +- nopoll, +- nommap, +- nostrategy, +- "vpb", +- 201, /* reserved for local use */ +- nodump, +- nopsize, +- D_TTY, +- -1 ++#if __FreeBSD_version > 503000 ++ .d_version = D_VERSION, ++#endif ++ .d_open = vpb_open, ++ .d_close = vpb_close, ++ .d_read = vpb_read, ++ .d_write = vpb_write, ++ .d_ioctl = vpb_ioctl, ++ .d_name = "vpb", ++ .d_maj = CDEV_MAJOR, + }; + + /* number of valid PCI devices detected */ +-static int numPCI; ++static int numPCI=0; + + /* translated base address of PLX9050 regions */ + static unsigned char *base0[MAX_V4PCI]; +@@ -144,7 +154,7 @@ + static short buf[SIZE_WD]; + + /* vars */ +-static dev_t sdev; ++static DEV_T sdev[MAX_V4PCI] ={ 0 }; /* replace with dynamic allocation! */ + + static device_method_t vpb_methods[] = { + /* Device interface */ +@@ -154,15 +164,19 @@ + DEVMETHOD(device_shutdown, vpb_shutdown), + DEVMETHOD(device_suspend, vpb_suspend), + DEVMETHOD(device_resume, vpb_resume), +- + { 0, 0 } + }; + ++struct vpb_softc { ++ u_int32_t unit; ++ DEV_T dev; ++}; ++ + static driver_t vpb_driver = { + "vpb", + vpb_methods, + 0, +- /* sizeof(struct vpb_softc), */ ++ /* sizeof(struct vpb_softc), */ + }; + + static devclass_t vpb_devclass; +@@ -173,7 +187,7 @@ + open/close/read/write at this point */ + + static int +-vpb_open(dev_t dev, int oflags, int devtype, struct proc *p) ++vpb_open(DEV_T dev, int oflags, int devtype, struct D_THREAD_T *td) + { + int err = 0; + +@@ -181,7 +195,7 @@ + } + + static int +-vpb_close(dev_t dev, int fflag, int devtype, struct proc *p) ++vpb_close(DEV_T dev, int fflag, int devtype, struct D_THREAD_T *td) + { + int err=0; + +@@ -189,7 +203,7 @@ + } + + static int +-vpb_read(dev_t dev, struct uio *uio, int ioflag) ++vpb_read(DEV_T dev, struct uio *uio, int ioflag) + { + int err = 0; + +@@ -197,7 +211,7 @@ + } + + static int +-vpb_write(dev_t dev, struct uio *uio, int ioflag) ++vpb_write(DEV_T dev, struct uio *uio, int ioflag) + { + int err = 0; + +@@ -205,7 +219,7 @@ + } + + static int +-vpb_ioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct proc *pr) ++vpb_ioctl(DEV_T dev, u_long cmd, caddr_t arg, int flag, struct D_THREAD_T *td) + { + VPB_DATA *vpb_data; /* ioctl parameters from user space */ + short *data; /* user space address of data */ +@@ -318,8 +332,14 @@ + int subsystem; + char *s; + ++ if(numPCI >= MAX_V4PCI) { ++ return ENXIO; ++ } ++ ++ /* struct vpb_softc *sc = (struct vpb_softc *)device_get_softc(dev); */ + if ((pci_get_vendor(dev) == 0x10b5) && (pci_get_device(dev) == 0x9050)) { + ++ /* bzero(sc, sizeof(struct vpb_softc)); */ + /* check that subsytem ID & Subsytem Vendor matches */ + subsystem = pci_read_config(dev, 0x2c, 4); + s = (char*)&subsystem; +@@ -327,7 +347,7 @@ + if ((s[3] == 'V') && (s[2] == '4') && (s[1] == 'V') && (s[0] == 'T')) { + + printf("V4PCI %d found!\n", numPCI); +- device_set_desc(dev, "Voicetronix V4PCI Computer Telephony Card"); ++ device_set_desc_copy(dev, "Voicetronix V4PCI Computer Telephony Card"); + return 0; + } + } +@@ -341,13 +361,16 @@ + vpb_attach(device_t dev) + { + vm_offset_t paddr; ++ /* int unit; */ + +- sdev = make_dev(&vpb_cdevsw, ++ /* unit = device_get_unit(dev); */ ++ sdev[numPCI] = make_dev(&vpb_cdevsw, + 0, + UID_ROOT, + GID_WHEEL, + 0600, +- "vpb"); ++ "vpb%d", ++ numPCI); + + /* OK, V4PCI found, so map address regions..... */ + paddr = (vm_offset_t)pci_read_config(dev, PCI_BASE_ADDR0, 4) & ~0xf; +@@ -357,7 +380,9 @@ + base2[numPCI] = pmap_mapdev(paddr, sizeof(short)*SIZE_WD); + + /* set wait-states */ +- *(base0[0]+0x28) = 0x00440422; ++ /* ((unsigned int)*(base0[0]+0x28)) = 0x00440422; */ ++ /* now adding 1 wait-state to Write cycle hold */ ++ ((unsigned int)*(base0[0]+0x28)) = 0x070440422; + + numPCI++; + +@@ -369,6 +394,11 @@ + static int + vpb_detach(device_t dev) + { ++ if(numPCI>0 && sdev[numPCI-1]!=NULL) { ++ destroy_dev(sdev[numPCI-1]); ++ sdev[numPCI-1]=NULL; ++ numPCI--; ++ } + return 0; + } + +@@ -491,4 +521,4 @@ + cntrl &= 1; + return(cntrl); + } +- ++ diff --git a/comms/vpb-driver/files/patch-Makefile b/comms/vpb-driver/files/patch-Makefile new file mode 100644 index 000000000000..644e0b56655a --- /dev/null +++ b/comms/vpb-driver/files/patch-Makefile @@ -0,0 +1,48 @@ +--- Makefile Thu Nov 4 07:33:22 2004 ++++ Makefile Fri Feb 11 16:55:17 2005 +@@ -26,8 +26,8 @@ + KERNEL_OLD := $(shell if [ -f $(KERNEL_LOCATION)/Rules.make ]; then echo 1; else echo 0; fi) + + # FreeBSD users: Please change this line to 'OS = FreeBSD' +-OS = linux +-#OS = FreeBSD ++#OS = linux ++OS = FreeBSD + export OS + + all: +@@ -37,20 +37,29 @@ + cd vpb-detect; make + else + echo FREEBSD +- cd src; gmake ++ cd src && gmake ++ cd FreeBSD && make + endif + + install: all ++ifeq ($(OS),linux) + mkdir -p $(root)/etc/vpb + cp -f firmware/vpbmain_isa.out $(root)/etc/vpb + cp -f firmware/vpbmain_pci.out $(root)/etc/vpb + cp -f firmware/vlcmain.out $(root)/etc/vpb + cp -f src/libvpb.a $(root)/usr/local/lib + cp -f src/vpbapi.h $(root)/usr/include +-ifneq ($(OS),linux) +- cp -f FreeBSD/vpb.c /sys/pci +- cp -f FreeBSD/vpbio.h /sys/sys +-else ++endif ++ifeq ($(OS),FreeBSD) ++ mkdir -p $(PREFIX)/etc/vpb ++ cp -f firmware/vpbmain_isa.out $(PREFIX)/etc/vpb ++ cp -f firmware/vpbmain_pci.out $(PREFIX)/etc/vpb ++ cp -f firmware/vlcmain.out $(PREFIX)/etc/vpb ++ cp -f src/libvpb.a $(PREFIX)/lib ++ cp -f src/vpbapi.h $(PREFIX)/include ++ cd FreeBSD && make install ++endif ++ifeq ($(OS),linux) + cp -f vpb-detect/vpbscan /usr/sbin + cp -f vpb-detect/vpbconf /usr/sbin + ifeq ($(KERNEL_OLD), 1) diff --git a/comms/vpb-driver/files/patch-src-comm.cpp b/comms/vpb-driver/files/patch-src-comm.cpp new file mode 100644 index 000000000000..3b0856719464 --- /dev/null +++ b/comms/vpb-driver/files/patch-src-comm.cpp @@ -0,0 +1,38 @@ +--- src/comm.cpp Tue Apr 19 12:02:20 2005 ++++ src/comm.cpp Tue Oct 4 21:13:30 2005 +@@ -841,6 +841,7 @@ + // GenericEnterCriticalSection(&PutMessageSect); + mprintf("CommData::IicWrite addr:%x, len:%x, buf:%x %x %x %x \n",\ + addr,length,buf[0],buf[1],buf[2],buf[3]); ++#ifndef __FreeBSD__ + switch (v->reg->model) + { + #ifndef WIN32 +@@ -859,6 +860,9 @@ + hip->WriteIic(board, addr, length, buf); + break; + } ++#else ++ hip->WriteIic(board, addr, length, buf); ++#endif + + // CheckForAssert(board); + // GenericLeaveCriticalSection(&PutMessageSect); //WIN32 has this in hipplx +@@ -886,6 +890,7 @@ + + // GenericEnterCriticalSection(&PutMessageSect); + ++#ifndef __FreeBSD__ + switch (v->reg->model) + { + #ifndef WIN32 +@@ -903,6 +908,9 @@ + hip->ReadIic(board, addr, length, buf); + break; + } ++#else ++ hip->ReadIic(board, addr, length, buf); ++#endif + + // CheckForAssert(board); + // GenericLeaveCriticalSection(&PutMessageSect); diff --git a/comms/vpb-driver/files/patch-src-genericfreebsd.cpp b/comms/vpb-driver/files/patch-src-genericfreebsd.cpp new file mode 100644 index 000000000000..7ad284498ba0 --- /dev/null +++ b/comms/vpb-driver/files/patch-src-genericfreebsd.cpp @@ -0,0 +1,43 @@ +--- src/genericfreebsd.cpp Wed Feb 19 14:19:30 2003 ++++ src/genericfreebsd.cpp Mon Oct 10 22:07:11 2005 +@@ -44,6 +44,11 @@ + #include "generic.h" + #include "vpb_ioctl.h" + ++#define MAX_BOARDS 12 ++#define BANKA 8 ++#define BANKB 12 ++int vpb_pconf[MAX_BOARDS][BANKB]; ++ + void GenericInitializeCriticalSection(GENERIC_CRITICAL_SECTION *cs) { + int ret; + pthread_mutex_t *pmut; +@@ -219,6 +224,28 @@ + params.data = buf; + + return ioctl(fd, VPB_IOC_PCI_BLOCK_WRITE, ¶ms); ++} ++ ++int Generic_pci_block_iicread( ++ int fd, ++ unsigned short board, ++ unsigned short addr, ++ unsigned short length, ++ unsigned short *buf) ++{ ++ // not supported in FreeBSD yet ++ return -1; ++} ++ ++int Generic_pci_block_iicwrite( ++ int fd, ++ unsigned short board, ++ unsigned short addr, ++ unsigned short length, ++ unsigned short *buf) ++{ ++ // not supported in FreeBSD yet ++ return -1; + } + + int Generic_pci_block_eeread( diff --git a/comms/vpb-driver/files/patch-src-hip.cpp b/comms/vpb-driver/files/patch-src-hip.cpp new file mode 100644 index 000000000000..650c4a45b7d8 --- /dev/null +++ b/comms/vpb-driver/files/patch-src-hip.cpp @@ -0,0 +1,48 @@ +--- src/hip.cpp Wed Aug 25 11:41:56 2004 ++++ src/hip.cpp Mon Mar 14 11:54:38 2005 +@@ -85,12 +85,10 @@ + word *buf) = 0; + virtual void ReadDspSram(USHORT board, USHORT addr, USHORT length, + word *buf) = 0; +-#ifndef __FreeBSD__ + virtual void WriteIic(USHORT board, USHORT addr, USHORT length, + word *buf) = 0; + virtual void ReadIic(USHORT board, USHORT addr, USHORT length, + word *buf) = 0; +-#endif + virtual void EeRead(USHORT board, USHORT addr, USHORT length, + word *buf) = 0; + virtual void SetPip(USHORT board, char enables) = 0; +@@ -295,7 +293,6 @@ + d->ReadDspSram(board, addr, length, buf); + } + +-#ifndef __FreeBSD__ + /*-------------------------------------------------------------------------*\ + + FUNCTION.: Hip::WriteIic +@@ -334,8 +331,6 @@ + d->ReadIic(board, addr, length, buf); + } + +-#endif +- + /*-------------------------------------------------------------------------*\ + + FUNCTION.: Hip::EeRead +@@ -945,7 +940,6 @@ + GenericLeaveCriticalSection(&HipSect); + } + +-#ifndef __FreeBSD__ + /*-------------------------------------------------------------------------*\ + + FUNCTION.: HipDataPCI::WriteIic +@@ -1011,7 +1005,6 @@ + + GenericLeaveCriticalSection(&HipSect); + } +-#endif + + /*-------------------------------------------------------------------------*\ + diff --git a/comms/vpb-driver/files/patch-src-vpbapi.cpp b/comms/vpb-driver/files/patch-src-vpbapi.cpp new file mode 100644 index 000000000000..df5108eef116 --- /dev/null +++ b/comms/vpb-driver/files/patch-src-vpbapi.cpp @@ -0,0 +1,20 @@ +--- src/vpbapi.cpp Tue Aug 30 14:59:02 2005 ++++ src/vpbapi.cpp Tue Oct 4 21:19:06 2005 +@@ -516,7 +516,7 @@ + Comm *c); + + static jmp_buf env; +-#ifdef linux ++#if defined(linux) || defined(__FreeBSD__) + static int check_3dnow(); + static int check_sse(); + #endif +@@ -3803,7 +3803,7 @@ + + return(VPB_OK); + } +-#ifdef linux ++#if defined(linux) || defined(__FreeBSD__) + int WINAPI vpb_is_station(int h) + { + extern int vpb_pconf[12][12]; diff --git a/comms/vpb-driver/files/patch-src-vpbapi.h b/comms/vpb-driver/files/patch-src-vpbapi.h new file mode 100644 index 000000000000..e65d9f85c91a --- /dev/null +++ b/comms/vpb-driver/files/patch-src-vpbapi.h @@ -0,0 +1,11 @@ +--- src/vpbapi.h Sat Feb 12 10:00:47 2005 ++++ src/vpbapi.h Sat Feb 12 10:01:56 2005 +@@ -150,7 +150,7 @@ + + \*-------------------------------------------------------------------------*/ + +-#ifdef linux ++#if defined(linux) || defined(__FreeBSD__) + int WINAPI vpb_set_station_sync(int handle, int state); + int WINAPI vpb_ring_station_async(int handle, int state, int one_ring); + int WINAPI vpb_user_ring_station_sync(int handle, int state); diff --git a/comms/vpb-driver/files/patch-src-vpbreg.cpp b/comms/vpb-driver/files/patch-src-vpbreg.cpp new file mode 100644 index 000000000000..c1ada3fd4a3e --- /dev/null +++ b/comms/vpb-driver/files/patch-src-vpbreg.cpp @@ -0,0 +1,15 @@ +--- src/vpbreg.cpp Sat Feb 12 09:50:04 2005 ++++ src/vpbreg.cpp Sat Feb 12 09:50:59 2005 +@@ -94,9 +94,9 @@ + + // path and name of firmware file + +-#define FIRMWARE_FILE_ISA "/etc/vpb/vpbmain_isa.out" +-#define FIRMWARE_FILE_ISA_VPB8L "/etc/vpb/vlcmain.out" +-#define FIRMWARE_FILE_PCI "/etc/vpb/vpbmain_pci.out" ++#define FIRMWARE_FILE_ISA "%%PREFIX%%/etc/vpb/vpbmain_isa.out" ++#define FIRMWARE_FILE_ISA_VPB8L "%%PREFIX%%/etc/vpb/vlcmain.out" ++#define FIRMWARE_FILE_PCI "%%PREFIX%%/etc/vpb/vpbmain_pci.out" + + /*-------------------------------------------------------------------------*\ + diff --git a/comms/vpb-driver/files/pkg-message.in b/comms/vpb-driver/files/pkg-message.in new file mode 100644 index 000000000000..f6f568331be3 --- /dev/null +++ b/comms/vpb-driver/files/pkg-message.in @@ -0,0 +1,34 @@ +------------------------------------------------------------------------------- +IMPORTANT INFORMATION! + +To load(use) the driver, run (as root): + + # kldload %%PREFIX%%/lib/vpb.ko + +To unload it: + + # kldunload vpb + +Alternatively you can copy the provided sample script + + %%PREFIX%%/etc/rc.d/vpb.sh.sample + +to + + %%PREFIX%%/etc/rc.d/vpb.sh + +and add + + vpb_driver_enable="YES" + +to your /etc/rc.conf file. + +This port is based on the original driver for FreeBSD RELENG_4 by Voicetronix. +I have updated the driver to compile as a kernel loadable module and added +the port infrastructure. Should you have issues with the above, please report +them to me. Problems related to the driver itself (vpb.c) and or the library +(libvpb.a) should also be directed to Voicetronix as the original authors +and code owners. + +-Chris +------------------------------------------------------------------------------- diff --git a/comms/vpb-driver/files/vpb.sh.in b/comms/vpb-driver/files/vpb.sh.in new file mode 100644 index 000000000000..d50a3e46ed82 --- /dev/null +++ b/comms/vpb-driver/files/vpb.sh.in @@ -0,0 +1,46 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: vpb-driver +# REQUIRE: NETWORKING +# KEYWORD: FreeBSD shutdown +# we load the vpb-driver after the network is fully loaded +# (for VOIP?) + +# +# Add the following lines to /etc/rc.conf to enable exim: +# +#vpb_driver_enable="YES" +# + +. %%RC_SUBR%% + +name=vpb_driver +rcvar=`set_rcvar` + +required_dirs= +vpb_module=%%PREFIX%%/lib/vpb.ko +required_files=${vpb_module} + +start_cmd=start_cmd +stop_cmd=stop_cmd + +extra_commands="reload" + +start_cmd() +{ + kldload ${vpb_module} +} + +stop_cmd() +{ + kldunload vpb +} + +# read settings, set default values +load_rc_config $name +: ${vpb_driver_enable="NO"} + +run_rc_command "$1" diff --git a/comms/vpb-driver/pkg-descr b/comms/vpb-driver/pkg-descr new file mode 100644 index 000000000000..d57b9f54ebd1 --- /dev/null +++ b/comms/vpb-driver/pkg-descr @@ -0,0 +1,9 @@ +A device-driver for the Voicetronix OpenLine4 PCI telephony card. +The OpenLine4 PCI telephony card can be used in conjunction with +asterisk (http://www.asterisk.org) to create a PC based PBX (private +branch exchange). + +WWW: http://www.voicetronix.com.au/vpb4_v4pci.htm + +- Chris Forkin +chris@forkin.com diff --git a/comms/vpb-driver/pkg-plist b/comms/vpb-driver/pkg-plist new file mode 100644 index 000000000000..f3cd2c2304dc --- /dev/null +++ b/comms/vpb-driver/pkg-plist @@ -0,0 +1,8 @@ +etc/rc.d/vpb.sh.sample +etc/vpb/vlcmain.out +etc/vpb/vpbmain_isa.out +etc/vpb/vpbmain_pci.out +include/vpbapi.h +lib/libvpb.a +lib/vpb.ko +@dirrm etc/vpb |