Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Apr 2007 02:16:39 -0400
From:      Phillip Neumann <pneumann@gmail.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        sobomax@FreeBSD.org
Subject:   ports/111556: [PATCH] misc/zaptel: update to 1.4r20070331
Message-ID:  <1176531399.2929@negro.transtel.cl>
Resent-Message-ID: <200704140620.l3E6K6Pn064835@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         111556
>Category:       ports
>Synopsis:       [PATCH] misc/zaptel: update to 1.4r20070331
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Apr 14 06:20:06 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Phillip Neumann
>Release:        FreeBSD 6.2-STABLE i386
>Organization:
>Environment:
System: FreeBSD negro.transtel.cl 6.2-STABLE FreeBSD 6.2-STABLE #1: Sun Feb 11 18:00:14 CLST 2007
>Description:
- Update to 1.4r20070331
- (Could not try to package it in my amd64 tinderbox...)

Added file(s):
- files/patch-oct6100_channel.c
- files/patch-oct612x-Makefile
- files/patch-qozap-qozap.c
- files/patch-zaphfc-zaphfc.c
- files/patch-ztcfg-Makefile

Removed file(s):
- files/patch-qozap::Makefile
- files/patch-qozap::qozap_freebsd.c
- files/patch-tau32pci::tau32pci.c
- files/patch-wcfxo::wcfxo.c
- files/patch-wcfxs::wcfxs.c
- files/patch-wct1xxp::wct1xxp.c
- files/patch-wct4xxp::wct4xxp.c
- files/patch-wcte11xp::wcte11xp.c
- files/patch-zaphfc::Makefile
- files/patch-zaphfc::zaphfc_freebsd.c
- files/patch-zaptel::zaptel.c

Port maintainer (sobomax@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:

--- zaptel-1.4r20070331_1.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/misc/zaptel/Makefile,v
retrieving revision 1.26
diff -u -r1.26 Makefile
--- Makefile	13 Apr 2007 07:04:32 -0000	1.26
+++ Makefile	14 Apr 2007 06:15:05 -0000
@@ -2,14 +2,15 @@
 # Date created:				29 April 2004
 # Whom:					Maxim Sobolev <sobomax@FreeBSD.org>
 #
-# $FreeBSD: ports/misc/zaptel/Makefile,v 1.26 2007/04/13 07:04:32 sobomax Exp $
+# $FreeBSD: ports/misc/zaptel/Makefile,v 1.24 2007/01/29 18:59:51 sobomax Exp $
 #
 
 PORTNAME=	zaptel
-PORTVERSION=	1.2.13
+PORTVERSION=	1.4r20070331
+PORTREVISION=	1
 CATEGORIES=	misc
-MASTER_SITES=	http://www.pbxpress.com/~gonzo/
-DISTNAME=	${PORTNAME}-bsd-${PORTVERSION}
+MASTER_SITES=	http://asterisk-bsd.googlecode.com/files/
+DISTNAME=	${PORTNAME}-1.4-snap-2007-03-31
 
 MAINTAINER=	sobomax@FreeBSD.org
 COMMENT=	A FreeBSD Driver for FXO, FXS, BRI and PRI Telephony Cards
@@ -24,12 +25,6 @@
 SUB_FILES=	pkg-message
 USE_RC_SUBR=	zaptel
 
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} < 500000
-IGNORE=	does not build on FreeBSD \< 5.x
-.endif
-
 pre-everything::
 	@if [ ! -f /usr/src/sys/Makefile ]; then \
 		${ECHO_MSG} ">> The zaptel port needs FreeBSD kernel source code to compile."; \
@@ -37,17 +32,11 @@
 		${FALSE}; \
 	fi
 
-post-patch:
-	@${REINPLACE_CMD} -e "s|<getopt.h>|<unistd.h>|g" \
-		${WRKSRC}/test/ztmonitor.c ${WRKSRC}/test/zttool.c \
-		${WRKSRC}/ztcfg/ztcfg.c
-
 pre-su-install:
 	@${MKDIR} ${PREFIX}/lib/zaptel
 
 post-install:
-	@${LN} -sfh ${PREFIX}/include ${PREFIX}/include/zaptel
 	@${TOUCH} ${PREFIX}/lib/zaptel/linker.hints
 	@${CAT} ${PKGMESSAGE}
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /home/ncvs/ports/misc/zaptel/distinfo,v
retrieving revision 1.14
diff -u -r1.14 distinfo
--- distinfo	13 Apr 2007 06:43:56 -0000	1.14
+++ distinfo	14 Apr 2007 06:15:05 -0000
@@ -1,3 +1,3 @@
-MD5 (zaptel-bsd-1.2.13.tar.gz) = d5d01a5c367969c302d1d70620e9c236
-SHA256 (zaptel-bsd-1.2.13.tar.gz) = c2032a94514016df28f788986aef7d099987aa1d4a62c4ea232af79c3b42a4c4
-SIZE (zaptel-bsd-1.2.13.tar.gz) = 363975
+MD5 (zaptel-1.4-snap-2007-03-31.tar.gz) = 078295efdd3e6587ecf6f2c1f35fac81
+SHA256 (zaptel-1.4-snap-2007-03-31.tar.gz) = ab5c291b730c7e1d6c1e0a218de7ce6f0cc1b4aa77506dd7e9f1dda5e2a519e1
+SIZE (zaptel-1.4-snap-2007-03-31.tar.gz) = 1007446
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/misc/zaptel/pkg-plist,v
retrieving revision 1.8
diff -u -r1.8 pkg-plist
--- pkg-plist	13 Apr 2007 07:04:32 -0000	1.8
+++ pkg-plist	14 Apr 2007 06:15:05 -0000
@@ -3,9 +3,8 @@
 bin/ztmonitor
 bin/zttest
 bin/zttool
-include/tonezone.h
-include/zaptel
-include/zaptel.h
+include/zaptel/tonezone.h
+include/zaptel/zaptel.h
 lib/libtonezone.a
 lib/zaptel/linker.hints
 lib/zaptel/qozap.ko
Index: files/patch-oct6100_channel.c
===================================================================
RCS file: files/patch-oct6100_channel.c
diff -N files/patch-oct6100_channel.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-oct6100_channel.c	14 Apr 2007 06:15:05 -0000
@@ -0,0 +1,10 @@
+--- ./oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_channel.c.orig	Sun Mar 11 13:34:31 2007
++++ ./oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_channel.c	Sat Mar 31 18:38:46 2007
+@@ -3562,6 +3562,7 @@
+ 	pTempChanOpen = malloc (sizeof(pTempChanOpen), M_DEVBUF, M_NOWAIT);
+ 	if (!pTempChanOpen)
+ 		return cOCT6100_ERR_CHANNEL_NOT_OPEN;
++	 bzero(pTempChanOpen, sizeof(*pTempChanOpen));
+ 
+ 	/* Check the user's configuration of the echo cancellation channel for errors. */
+ 	ulResult = Oct6100ApiCheckChannelModify( f_pApiInstance, 
Index: files/patch-oct612x-Makefile
===================================================================
RCS file: files/patch-oct612x-Makefile
diff -N files/patch-oct612x-Makefile
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-oct612x-Makefile	14 Apr 2007 06:15:05 -0000
@@ -0,0 +1,8 @@
+--- ./oct612x/Makefile.orig	Sun Mar 11 13:34:31 2007
++++ ./oct612x/Makefile	Sat Mar 31 18:38:46 2007
+@@ -1,4 +1,4 @@
+-CFLAGS=-ffunction-sections -Iinclude -Ioctdeviceapi -Ioctdeviceapi/oct6100api -DGFP_ATOMIC=0 -Dkmalloc=calloc -Dkfree=free -D_KERNEL
++CFLAGS=-ffunction-sections -Iinclude -Ioctdeviceapi -Ioctdeviceapi/oct6100api -DGFP_ATOMIC=0 -Dmalloc=calloc -D_KERNEL
+ LDFLAGS=-V3.4 -Wl,-Map -Wl,test.map -Wl,--gc-sections
+ 
+ APIDIR=octdeviceapi/oct6100api/oct6100_api
Index: files/patch-qozap-qozap.c
===================================================================
RCS file: files/patch-qozap-qozap.c
diff -N files/patch-qozap-qozap.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-qozap-qozap.c	14 Apr 2007 06:15:05 -0000
@@ -0,0 +1,65 @@
+--- ./qozap/qozap.c.orig	Wed Jan  3 08:05:55 2007
++++ ./qozap/qozap.c	Sat Mar 31 18:38:46 2007
+@@ -92,7 +92,7 @@
+ 		    printk(KERN_INFO "qozap: unregistered card %d span %d.\n",qoztmp->cardno,s+1);
+ 	    }
+ 	}
+-	kfree(qoztmp->ztdev);
++	free(qoztmp->ztdev);
+ 	qoztmp->ztdev = NULL;
+     }
+ 
+@@ -1051,9 +1051,9 @@
+ 	    return -1;
+ 	}
+ 
+-	qoztmp = kmalloc(sizeof(struct qoz_card),GFP_KERNEL);
++	qoztmp = malloc(sizeof(struct qoz_card),GFP_KERNEL);
+ 	if (!qoztmp) {
+-	    printk(KERN_WARNING "qozap: unable to kmalloc!\n");
++	    printk(KERN_WARNING "qozap: unable to malloc!\n");
+ 	    pci_disable_device(tmp);
+ 	    multi_qoz = NULL;
+ 	    return -ENOMEM;
+@@ -1081,7 +1081,7 @@
+ 	
+ 	if (request_irq(qoztmp->irq, qoz_interrupt, SA_INTERRUPT | SA_SHIRQ, "qozap", qoztmp)) {
+ 	    printk(KERN_WARNING "qozap: unable to register irq\n");
+-	    kfree(qoztmp);
++	    free(qoztmp);
+ 	    pci_disable_device(tmp);
+ 	    multi_qoz = NULL;
+ 	    return -EIO;
+@@ -1096,11 +1096,11 @@
+ 	/* disable ints */
+ 	qoz_outb(qoztmp,qoz_R_IRQ_CTRL, 0); 
+ 
+-	ztqoz = kmalloc(sizeof(struct zt_qoz),GFP_KERNEL);
++	ztqoz = malloc(sizeof(struct zt_qoz),GFP_KERNEL);
+ 	if (!ztqoz) {
+-	    printk(KERN_INFO "qozap: unable to kmalloc!\n");
++	    printk(KERN_INFO "qozap: unable to malloc!\n");
+ 	    qoz_shutdownCard(qoztmp);
+-	    kfree(qoztmp);
++	    free(qoztmp);
+ 	    multi_qoz = NULL;
+ 	    return -ENOMEM;
+ 	}
+@@ -1170,7 +1170,7 @@
+ 		    }
+ 		    pci_write_config_word(qoztmp->pcidev, PCI_COMMAND, 0);	/* disable memio */
+ 		    free_irq(qoztmp->irq,qoztmp);
+-		    kfree(qoztmp);
++		    free(qoztmp);
+ 		    qoztmp = NULL;
+ 		    tmp = pci_find_device(PCI_VENDOR_ID_CCD,pcidid,multi_qoz);
+ 		    continue;
+@@ -1281,7 +1281,7 @@
+     spin_lock(&registerlock);
+     while (tmplist != NULL) {
+ 	tmpcard = tmplist->next;
+-	kfree(tmplist);
++	free(tmplist);
+ 	i++;
+ 	tmplist = tmpcard;
+     }
Index: files/patch-qozap::Makefile
===================================================================
RCS file: files/patch-qozap::Makefile
diff -N files/patch-qozap::Makefile
--- files/patch-qozap::Makefile	6 Jul 2006 05:53:36 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-
-$FreeBSD: ports/misc/zaptel/files/patch-qozap::Makefile,v 1.3 2006/07/06 05:53:36 sobomax Exp $
-
---- qozap/Makefile
-+++ qozap/Makefile
-@@ -7,7 +7,7 @@
- KMOD=	qozap
- SRCS=	qozap.c qozap_freebsd.c
- SRCS+=	device_if.h bus_if.h isa_if.h pci_if.h 
--CFLAGS+=-I../zaptel
-+CFLAGS+=-I../zaptel -DCONFIG_PCI=1
- WERROR=	-Wall
- 
- #DEBUG_FLAGS=	-g
Index: files/patch-qozap::qozap_freebsd.c
===================================================================
RCS file: files/patch-qozap::qozap_freebsd.c
diff -N files/patch-qozap::qozap_freebsd.c
--- files/patch-qozap::qozap_freebsd.c	13 Apr 2007 06:43:57 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,21 +0,0 @@
-
-$FreeBSD: ports/misc/zaptel/files/patch-qozap::qozap_freebsd.c,v 1.3 2007/04/13 06:43:57 sobomax Exp $
-
---- qozap/qozap_freebsd.c
-+++ qozap/qozap_freebsd.c
-@@ -175,9 +175,15 @@
- 		qozap_free(sc);
- 		return (ENXIO);
- 	}
-+#if __FreeBSD_version < 700031
- 	error = bus_setup_intr(
- 	    dev, sc->irq_res, INTR_TYPE_CLK | INTR_FAST, qoz_interrupt,
- 	    sc, &sc->irq_handle);
-+#else
-+	error = bus_setup_intr(
-+	    dev, sc->irq_res, INTR_TYPE_CLK | INTR_FAST, NULL, qoz_interrupt,
-+	    sc, &sc->irq_handle);
-+#endif
- 	if (error) {
- 		device_printf(dev, "Can't setup interrupt handler (error %d)\n",
- 		    error);
Index: files/patch-tau32pci::tau32pci.c
===================================================================
RCS file: files/patch-tau32pci::tau32pci.c
diff -N files/patch-tau32pci::tau32pci.c
--- files/patch-tau32pci::tau32pci.c	13 Apr 2007 06:43:57 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,24 +0,0 @@
-
-$FreeBSD: ports/misc/zaptel/files/patch-tau32pci::tau32pci.c,v 1.1 2007/04/13 06:43:57 sobomax Exp $
-
---- tau32pci/tau32pci.c
-+++ tau32pci/tau32pci.c
-@@ -2785,10 +2785,18 @@
- 	}
- 
- 	/* set interrupt handler */
-+#if __FreeBSD_version < 700031
- 	error  = bus_setup_intr (dev, board->tau32_irq, INTR_TYPE_CLK | INTR_FAST, tau32_intr, board, &board->tau32_intrhand);
-+#else
-+	error  = bus_setup_intr (dev, board->tau32_irq, INTR_TYPE_CLK | INTR_FAST, NULL, tau32_intr, board, &board->tau32_intrhand);
-+#endif
- 	if(error) {
- 		printf ("tau32_%d: Can't use fast interrupts, switching to generic\n", unit);
-+#if __FreeBSD_version < 700031
- 		error  = bus_setup_intr (dev, board->tau32_irq, INTR_TYPE_CLK, tau32_intr, board, &(board->tau32_intrhand));
-+#else
-+		error  = bus_setup_intr (dev, board->tau32_irq, INTR_TYPE_CLK, NULL, tau32_intr, board, &(board->tau32_intrhand));
-+#endif
- 	}
- 
- 
Index: files/patch-wcfxo::wcfxo.c
===================================================================
RCS file: files/patch-wcfxo::wcfxo.c
diff -N files/patch-wcfxo::wcfxo.c
--- files/patch-wcfxo::wcfxo.c	13 Apr 2007 06:43:57 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,31 +0,0 @@
-
-$FreeBSD: ports/misc/zaptel/files/patch-wcfxo::wcfxo.c,v 1.3 2007/04/13 06:43:57 sobomax Exp $
-
---- wcfxo/wcfxo.c
-+++ wcfxo/wcfxo.c
-@@ -1285,14 +1285,25 @@
- 
- 	/* Now we should set up the interrupt handler */
- 
-+#if __FreeBSD_version < 700031
- 	error = bus_setup_intr(dev, sc->wc_irq, INTR_TYPE_CLK | INTR_FAST,
- 		(void (*)(void *))wcfxo_interrupt, sc, &(sc->irq_handler));
-+#else
-+	error = bus_setup_intr(dev, sc->wc_irq, INTR_TYPE_CLK | INTR_FAST, NULL,
-+		(void (*)(void *))wcfxo_interrupt, sc, &(sc->irq_handler));
-+#endif
- 
- 	if(error)
- 	{
- 		printf("Can't use fast interrupts, falling back to normal\n");
-+#if __FreeBSD_version < 700031
- 		error = bus_setup_intr(dev, sc->wc_irq, INTR_TYPE_CLK,
- 			(void (*)(void *))wcfxo_interrupt, sc, &(sc->irq_handler));
-+#else
-+		error = bus_setup_intr(dev, sc->wc_irq, INTR_TYPE_CLK, NULL,
-+			(void (*)(void *))wcfxo_interrupt, sc, &(sc->irq_handler));
-+#endif
-+
- 	}
- 
- 	if (error) {
Index: files/patch-wcfxs::wcfxs.c
===================================================================
RCS file: files/patch-wcfxs::wcfxs.c
diff -N files/patch-wcfxs::wcfxs.c
--- files/patch-wcfxs::wcfxs.c	13 Apr 2007 06:43:57 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,29 +0,0 @@
-
-$FreeBSD: ports/misc/zaptel/files/patch-wcfxs::wcfxs.c,v 1.3 2007/04/13 06:43:57 sobomax Exp $
-
---- wcfxs/wcfxs.c
-+++ wcfxs/wcfxs.c
-@@ -2764,12 +2764,23 @@
- 
- 	/* Now we should set up the interrupt handler */
- 
-+#if __FreeBSD_version < 700031
- 	error = bus_setup_intr(dev, sc->wc_irq, INTR_TYPE_CLK | INTR_FAST,
- 		(void (*)(void *))wcfxs_interrupt, sc, &(sc->irq_handler));
-+#else
-+	error = bus_setup_intr(dev, sc->wc_irq, INTR_TYPE_CLK | INTR_FAST, NULL,
-+		(void (*)(void *))wcfxs_interrupt, sc, &(sc->irq_handler));
-+#endif
-+
- 	if (error) {
- 		printf("Can't use fast interrupts, falling back to normal\n");
-+#if __FreeBSD_version < 700031
- 		error = bus_setup_intr(dev, sc->wc_irq, INTR_TYPE_CLK,
- 			(void (*)(void *))wcfxs_interrupt, sc, &(sc->irq_handler));
-+#else
-+		error = bus_setup_intr(dev, sc->wc_irq, INTR_TYPE_CLK, NULL,
-+			(void (*)(void *))wcfxs_interrupt, sc, &(sc->irq_handler));
-+#endif
- 		if(error)
- 		{
- 			printf("Couldn't set up irq\n");
Index: files/patch-wct1xxp::wct1xxp.c
===================================================================
RCS file: files/patch-wct1xxp::wct1xxp.c
diff -N files/patch-wct1xxp::wct1xxp.c
--- files/patch-wct1xxp::wct1xxp.c	13 Apr 2007 06:43:57 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,30 +0,0 @@
-
-$FreeBSD: ports/misc/zaptel/files/patch-wct1xxp::wct1xxp.c,v 1.1 2007/04/13 06:43:57 sobomax Exp $
-
---- wct1xxp/wct1xxp.c
-+++ wct1xxp/wct1xxp.c
-@@ -1746,14 +1746,24 @@
- 
- 	/* Now we should set up the interrupt handler */
- 
-+#if __FreeBSD_version < 700031
- 	error = bus_setup_intr(dev, sc->wc_irq, INTR_TYPE_CLK | INTR_FAST,
- 		(void (*)(void *))wct1xxp_interrupt, sc, &(sc->irq_handler));
-+#else
-+	error = bus_setup_intr(dev, sc->wc_irq, INTR_TYPE_CLK | INTR_FAST, NULL,
-+		(void (*)(void *))wct1xxp_interrupt, sc, &(sc->irq_handler));
-+#endif
- 
- 	if(error)
- 	{
- 		printf("Can not use fast interrupts, switching to generic\n");
-+#if __FreeBSD_version < 700031
- 		error = bus_setup_intr(dev, sc->wc_irq, INTR_TYPE_CLK,
- 			(void (*)(void *))wct1xxp_interrupt, sc, &(sc->irq_handler));
-+#else
-+		error = bus_setup_intr(dev, sc->wc_irq, INTR_TYPE_CLK, NULL,
-+			(void (*)(void *))wct1xxp_interrupt, sc, &(sc->irq_handler));
-+#endif
- 	}
- 
- 
Index: files/patch-wct4xxp::wct4xxp.c
===================================================================
RCS file: files/patch-wct4xxp::wct4xxp.c
diff -N files/patch-wct4xxp::wct4xxp.c
--- files/patch-wct4xxp::wct4xxp.c	13 Apr 2007 06:43:57 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,35 +0,0 @@
-
-$FreeBSD: ports/misc/zaptel/files/patch-wct4xxp::wct4xxp.c,v 1.1 2007/04/13 06:43:57 sobomax Exp $
-
---- wct4xxp/wct4xxp.c
-+++ wct4xxp/wct4xxp.c
-@@ -3800,15 +3800,29 @@
- 	    return ENXIO;
- 	}
- 
-+#if __FreeBSD_version < 700031
- 	error = bus_setup_intr(dev, wc->wc_irq, INTR_TYPE_CLK | INTR_FAST,
- 	    (void (*)(void *)) ((ident->device_info->flags & FLAG_2NDGEN) ?  
- 	    t4_interrupt_gen2 : t4_interrupt), wc, &(wc->irq_handler));
-+#else
-+	error = bus_setup_intr(dev, wc->wc_irq, INTR_TYPE_CLK | INTR_FAST, NULL,
-+	    (void (*)(void *)) ((ident->device_info->flags & FLAG_2NDGEN) ?
-+	    t4_interrupt_gen2 : t4_interrupt), wc, &(wc->irq_handler));
-+#endif
-+
- 	if(error)
- 	{
- 		printf("Can't use fast interrupts falling back to normal\n");
-+#if __FreeBSD_version < 700031
- 		error = bus_setup_intr(dev, wc->wc_irq, INTR_TYPE_CLK,
- 	    		(void (*)(void *)) ((ident->device_info->flags & FLAG_2NDGEN) ?  
- 	    		t4_interrupt_gen2 : t4_interrupt), wc, &(wc->irq_handler));
-+#else
-+		error = bus_setup_intr(dev, wc->wc_irq, INTR_TYPE_CLK, NULL,
-+			(void (*)(void *)) ((ident->device_info->flags & FLAG_2NDGEN) ?
-+			t4_interrupt_gen2 : t4_interrupt), wc, &(wc->irq_handler));
-+#endif
-+
- 
- 	}
- 
Index: files/patch-wcte11xp::wcte11xp.c
===================================================================
RCS file: files/patch-wcte11xp::wcte11xp.c
diff -N files/patch-wcte11xp::wcte11xp.c
--- files/patch-wcte11xp::wcte11xp.c	13 Apr 2007 06:43:57 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,30 +0,0 @@
-
-$FreeBSD: ports/misc/zaptel/files/patch-wcte11xp::wcte11xp.c,v 1.1 2007/04/13 06:43:57 sobomax Exp $
-
---- wcte11xp/wcte11xp.c
-+++ wcte11xp/wcte11xp.c
-@@ -1953,14 +1953,24 @@
- 
- 	/* Now we should set up the interrupt handler */
- 
-+#if __FreeBSD_version < 700031
- 	error = bus_setup_intr(dev, sc->wc_irq, INTR_TYPE_CLK | INTR_FAST,
- 		(void (*)(void *))wcte11xp_interrupt, sc, &(sc->irq_handler));
-+#else
-+	error = bus_setup_intr(dev, sc->wc_irq, INTR_TYPE_CLK | INTR_FAST, NULL,
-+		(void (*)(void *))wcte11xp_interrupt, sc, &(sc->irq_handler));
-+#endif
- 
- 	if(error)
- 	{
- 		printf("Can not use fast interrupts, switching to generic\n");
-+#if __FreeBSD_version < 700031
- 		error = bus_setup_intr(dev, sc->wc_irq, INTR_TYPE_CLK,
- 			(void (*)(void *))wcte11xp_interrupt, sc, &(sc->irq_handler));
-+#else
-+		error = bus_setup_intr(dev, sc->wc_irq, INTR_TYPE_CLK, NULL,
-+			(void (*)(void *))wcte11xp_interrupt, sc, &(sc->irq_handler));
-+#endif
- 	}
- 
- 	if (error) {
Index: files/patch-zaphfc-zaphfc.c
===================================================================
RCS file: files/patch-zaphfc-zaphfc.c
diff -N files/patch-zaphfc-zaphfc.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-zaphfc-zaphfc.c	14 Apr 2007 06:15:05 -0000
@@ -0,0 +1,88 @@
+--- ./zaphfc/zaphfc.c.orig	Wed Jan  3 08:05:55 2007
++++ ./zaphfc/zaphfc.c	Sat Mar 31 18:38:46 2007
+@@ -140,7 +140,7 @@
+     pci_write_config_word(hfctmp->pcidev, PCI_COMMAND, 0);	/* disable memio and bustmaster */
+ 
+     if (hfctmp->fifomem != NULL) {
+-        kfree(hfctmp->fifomem);
++        free(hfctmp->fifomem);
+     }
+     iounmap((void *) hfctmp->pci_io);
+     hfctmp->pci_io = NULL;
+@@ -150,7 +150,7 @@
+     spin_unlock_irqrestore(&hfctmp->lock,flags);
+     if (hfctmp->ztdev != NULL) {
+ 	zt_unregister(&hfctmp->ztdev->span);
+-	kfree(hfctmp->ztdev);
++	free(hfctmp->ztdev);
+ 	printk(KERN_INFO "unregistered from zaptel.\n");
+     }
+ }
+@@ -1156,9 +1156,9 @@
+ 	}
+ 	pci_set_master(tmp);
+ 
+-	hfctmp = kmalloc(sizeof(struct hfc_card), GFP_KERNEL);
++	hfctmp = malloc(sizeof(struct hfc_card), GFP_KERNEL);
+ 	if (!hfctmp) {
+-	    printk(KERN_WARNING "zaphfc: unable to kmalloc!\n");
++	    printk(KERN_WARNING "zaphfc: unable to malloc!\n");
+ 	    pci_disable_device(tmp);
+ 	    multi_hfc = NULL;
+ 	    return -ENOMEM;
+@@ -1179,16 +1179,16 @@
+ 	hfctmp->pci_io = (char *) tmp->resource[1].start;
+ 	if (!hfctmp->pci_io) {
+ 	    printk(KERN_WARNING "zaphfc: no iomem!\n");
+-	    kfree(hfctmp);
++	    free(hfctmp);
+ 	    pci_disable_device(tmp);
+ 	    multi_hfc = NULL;
+ 	    return -1;
+ 	}
+ 	
+-	hfctmp->fifomem = kmalloc(65536, GFP_KERNEL);
++	hfctmp->fifomem = malloc(65536, GFP_KERNEL);
+ 	if (!hfctmp->fifomem) {
+-	    printk(KERN_WARNING "zaphfc: unable to kmalloc fifomem!\n");
+-	    kfree(hfctmp);
++	    printk(KERN_WARNING "zaphfc: unable to malloc fifomem!\n");
++	    free(hfctmp);
+ 	    pci_disable_device(tmp);
+ 	    multi_hfc = NULL;
+ 	    return -ENOMEM;
+@@ -1205,8 +1205,8 @@
+ #else
+ 	if (request_irq(hfctmp->irq, &hfc_interrupt, SA_INTERRUPT | SA_SHIRQ, "zaphfc", hfctmp)) {
+ 	    printk(KERN_WARNING "zaphfc: unable to register irq\n");
+-	    kfree(hfctmp->fifomem);
+-	    kfree(hfctmp);
++	    free(hfctmp->fifomem);
++	    free(hfctmp);
+ 	    iounmap((void *) hfctmp->pci_io);
+ 	    pci_disable_device(tmp);
+ 	    multi_hfc = NULL;
+@@ -1238,11 +1238,11 @@
+ 	    hfctmp->regs.nt_mode = 0;
+ 	}
+ 
+-	zthfc = kmalloc(sizeof(struct zt_hfc),GFP_KERNEL);
++	zthfc = malloc(sizeof(struct zt_hfc),GFP_KERNEL);
+ 	if (!zthfc) {
+-	    printk(KERN_CRIT "zaphfc: unable to kmalloc!\n");
++	    printk(KERN_CRIT "zaphfc: unable to malloc!\n");
+ 	    hfc_shutdownCard(hfctmp);
+-	    kfree(hfctmp);
++	    free(hfctmp);
+ 	    multi_hfc = NULL;
+ 	    return -ENOMEM;
+ 	}
+@@ -1327,7 +1327,7 @@
+ 	tmpcard = hfc_dev_list;
+ 	hfc_dev_list = hfc_dev_list->next;
+ 	if (tmpcard != NULL) {
+-	    kfree(tmpcard);
++	    free(tmpcard);
+ 	    tmpcard = NULL;
+ 	    printk(KERN_INFO "zaphfc: freed one card.\n");
+ 	}
Index: files/patch-zaphfc::Makefile
===================================================================
RCS file: files/patch-zaphfc::Makefile
diff -N files/patch-zaphfc::Makefile
--- files/patch-zaphfc::Makefile	13 Apr 2007 06:43:57 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-
-$FreeBSD: ports/misc/zaptel/files/patch-zaphfc::Makefile,v 1.2 2007/04/13 06:43:57 sobomax Exp $
-
---- zaphfc/Makefile.orig
-+++ zaphfc/Makefile
-@@ -7,9 +7,7 @@
- KMOD=	zaphfc
- SRCS=	zaphfc.c zaphfc_freebsd.c
- SRCS+=	device_if.h bus_if.h isa_if.h pci_if.h 
--CFLAGS+=-I../zaptel
-+CFLAGS+=-I../zaptel -DCONFIG_PCI=1 -g
- WERROR=	-Wall
--
--DEBUG_FLAGS=	-g
- 
- .include <bsd.kmod.mk>
Index: files/patch-zaphfc::zaphfc_freebsd.c
===================================================================
RCS file: files/patch-zaphfc::zaphfc_freebsd.c
diff -N files/patch-zaphfc::zaphfc_freebsd.c
--- files/patch-zaphfc::zaphfc_freebsd.c	13 Apr 2007 06:43:57 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,32 +0,0 @@
-
-$FreeBSD: ports/misc/zaptel/files/patch-zaphfc::zaphfc_freebsd.c,v 1.1 2007/04/13 06:43:57 sobomax Exp $
-
---- zaphfc/zaphfc_freebsd.c
-+++ zaphfc/zaphfc_freebsd.c
-@@ -328,14 +328,26 @@
- 		zaphfc_free(sc);
- 		return (ENXIO);
- 	}
-+#if __FreeBSD_version < 700031
- 	error = bus_setup_intr(
- 	    dev, sc->irq_res, INTR_TYPE_CLK | INTR_FAST,
- 	    hfc_interrupt, sc, &sc->irq_handle);
-+#else
-+	error = bus_setup_intr(
-+	    dev, sc->irq_res, INTR_TYPE_CLK | INTR_FAST, NULL,
-+	    hfc_interrupt, sc, &sc->irq_handle);
-+#endif
- 
-     if(error)
-+#if __FreeBSD_version < 700031
- 	    error = bus_setup_intr(
- 	        dev, sc->irq_res, INTR_TYPE_CLK,
- 	        hfc_interrupt, sc, &sc->irq_handle);
-+#else
-+	     error = bus_setup_intr(
-+		dev, sc->irq_res, INTR_TYPE_CLK, NULL,
-+		hfc_interrupt, sc, &sc->irq_handle);
-+#endif
- 
- 	if (error) {
- 		device_printf(dev, "Can't setup interrupt handler (error %d)\n",
Index: files/patch-zaptel::zaptel.c
===================================================================
RCS file: files/patch-zaptel::zaptel.c
diff -N files/patch-zaptel::zaptel.c
--- files/patch-zaptel::zaptel.c	29 Jan 2007 18:59:51 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
---- zaptel/zaptel.c.orig	Sun Jun 25 14:21:49 2006
-+++ zaptel/zaptel.c	Fri Aug 11 11:56:20 2006
-@@ -397,7 +397,7 @@
- 
- int schluffen(void *q)
- {
--	int rc = tsleep(q, PZERO | PCATCH, "schluffen", 0);
-+	int rc = tsleep(q, PZERO | PCATCH, "schluffen", 10);
- 	switch(rc)
- 	{
- 		case EINTR:
Index: files/patch-ztcfg-Makefile
===================================================================
RCS file: files/patch-ztcfg-Makefile
diff -N files/patch-ztcfg-Makefile
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-ztcfg-Makefile	14 Apr 2007 06:15:05 -0000
@@ -0,0 +1,24 @@
+--- ztcfg/Makefile.orig	Wed Feb 14 11:10:07 2007
++++ ztcfg/Makefile	Tue Apr  3 15:20:34 2007
+@@ -7,6 +7,7 @@
+ INSTALL=/usr/bin/install
+ BSD_INSTALL_PROGRAM?=${INSTALL} -o root -g wheel -m 755 -s
+ BSD_INSTALL_DATA?=${INSTALL} -o root -g wheel -m 644
++MKDIR?=/bin/mkdir -p
+ 
+ all: ztcfg libtonezone.a
+ 
+@@ -28,10 +29,11 @@
+ 	ar r libtonezone.a tonezone.o zonedata.o
+ 
+ install:
++	${MKDIR} ${PREFIX}/include/zaptel
+ 	${BSD_INSTALL_PROGRAM} ztcfg ${PREFIX}/bin/
+ 	${BSD_INSTALL_DATA} libtonezone.a ${PREFIX}/lib/
+-	${BSD_INSTALL_DATA} tonezone.h ${PREFIX}/include/
+-	${BSD_INSTALL_DATA} ../zaptel/zaptel.h ${PREFIX}/include/
++	${BSD_INSTALL_DATA} tonezone.h ${PREFIX}/include/zaptel
++	${BSD_INSTALL_DATA} ../zaptel/zaptel.h ${PREFIX}/include/zaptel
+ 
+ clean: 
+ 	rm -f *.o ztcfg *.a
Index: files/pkg-message.in
===================================================================
RCS file: /home/ncvs/ports/misc/zaptel/files/pkg-message.in,v
retrieving revision 1.2
diff -u -r1.2 pkg-message.in
--- files/pkg-message.in	13 Apr 2007 06:43:57 -0000	1.2
+++ files/pkg-message.in	14 Apr 2007 06:15:05 -0000
@@ -19,8 +19,7 @@
 
 Great thanks to all companies and individuals who made this driver happen,
 including but not limited to, John Todd, Chris Coleman, Alexander Timoshenko,
-PBXpress, Inc, Max Khon, LF.net, Luigi Rizzo, Dinesh Nair, Yuri Saltikov and 
-others contributors.
+PBXpress, Inc, Max Khon, LF.net, Luigi Rizzo and others contributors.
 
 Thanks and enjoy!
 
--- zaptel-1.4r20070331_1.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1176531399.2929>