diff options
author | David W. Chapman Jr. <dwcjr@FreeBSD.org> | 2002-06-24 02:41:53 +0000 |
---|---|---|
committer | David W. Chapman Jr. <dwcjr@FreeBSD.org> | 2002-06-24 02:41:53 +0000 |
commit | 3f33af92d9829ce9d687e40c494369892fe87192 (patch) | |
tree | 8d2a2ecfa90c55ec3d1298cd741831212781bcf3 | |
parent | Bump PORTREVISION. (diff) |
Fix properly for building under -current
Enable cardbus support these modembs
Bump PORTREVISION
Submitted by: author
Approved by: maintainer
Notes
Notes:
svn path=/head/; revision=61854
-rw-r--r-- | comms/ltmdm/Makefile | 29 | ||||
-rw-r--r-- | comms/ltmdm/files/current-fix | 88 | ||||
-rw-r--r-- | comms/ltmdm/files/patch-aa | 14 | ||||
-rw-r--r-- | comms/ltmdm/files/patch-ab | 93 | ||||
-rw-r--r-- | comms/ltmdm/files/patch-ac | 39 | ||||
-rw-r--r-- | comms/ltmdm/files/patch-ad | 14 | ||||
-rw-r--r-- | comms/ltmdm/pkg-descr | 3 |
7 files changed, 176 insertions, 104 deletions
diff --git a/comms/ltmdm/Makefile b/comms/ltmdm/Makefile index d8c8d5261741..a4cdd2fff1a4 100644 --- a/comms/ltmdm/Makefile +++ b/comms/ltmdm/Makefile @@ -7,7 +7,7 @@ PORTNAME= ltmdm PORTVERSION= 1.4 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= comms MASTER_SITES= http://www.dons.net.au/~darius/ \ http://www.csociety.org/~will/ \ @@ -20,12 +20,17 @@ MAINTAINER= darius@dons.net.au ONLY_FOR_ARCHS= i386 BUILD_WRKSRC= ${WRKSRC}/sys/modules/ltmdm NO_WRKSUBDIR= yes + +LTMDM_DEV_MAJOR ?= 228 +LTMDM_OBJ_VERSION ?= 600 + .if defined(USE_595_OBJ) -MAKE_ARGS+= LTMDM_OBJ_VERSION=595 -.else -MAKE_ARGS+= LTMDM_OBJ_VERSION=600 +MAKE_ARGS = LTMDM_OBJ_VERSION=595 .endif +MAKE_ARGS+= LTMDM_DEV_MAJOR=${LTMDM_DEV_MAJOR} +MAKE_ARGS+= LTMDM_OBJ_VERSION=${LTMDM_OBJ_VERSION} + pre-fetch: .if !exists(${SRC_BASE}/sys/Makefile) @${ECHO} "*************************************************"; \ @@ -35,13 +40,15 @@ pre-fetch: .endif .if !defined(USE_595_OBJ) @${ECHO} "*************************************************"; - @${ECHO} "If you have a K56Flex modem define USE_595_OBJ "; - @${ECHO} "Otheriwse your modem will not work "; + @${ECHO} "If your ISP supports K56flex protocol only and "; + @${ECHO} " doesn't support V90, define USE_595_OBJ. "; + @${ECHO} "Otheriwse your modem will not connect "; @${ECHO} "*************************************************"; .endif do-install: - @${PERL} -pi.orig -e "s@%%PREFIX%%@${PREFIX}@g" ${WRKSRC}/ltmdm.sh + @${SED} "s:%%PREFIX%%:${PREFIX}:;s:%%MAJOR%%:${LTMDM_DEV_MAJOR}:" \ + < ${FILESDIR}/ltmdm.sh > ${WRKSRC}/ltmdm.sh @${MKDIR} ${DATADIR} @${INSTALL_DATA} ${WRKSRC}/sys/modules/ltmdm/ltmdm.ko ${DATADIR} @${INSTALL_SCRIPT} ${WRKSRC}/ltmdm.sh ${PREFIX}/etc/rc.d/ @@ -54,10 +61,4 @@ do-install: .endif @${CAT} ${PKGMESSAGE} -.include <bsd.port.pre.mk> -.if ${OSVERSION} >= 500000 -do-patch: - @${CAT} files/current-fix | ${PATCH} -.endif - -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/comms/ltmdm/files/current-fix b/comms/ltmdm/files/current-fix deleted file mode 100644 index 749ae352613d..000000000000 --- a/comms/ltmdm/files/current-fix +++ /dev/null @@ -1,88 +0,0 @@ ---- work/sys/dev/ltmdm/ltmdmsio.c Tue Mar 12 02:47:31 2002 -+++ work/sys/dev/ltmdm/ltmdmsio.c Tue Jun 11 04:49:45 2002 -@@ -123,12 +123,6 @@ - #define lt_enable_intr() enable_intr() - #endif - --#if __FreeBSD_version >= 500023 /* >= 20010912 */ --#define proc thread /* temporary hack: struct proc -> stuct thread */ --#define suser(p) suser_td(p) --#endif -- -- - #define LOTS_OF_EVENTS 64 /* helps separate urgent events from input */ - - #define CALLOUT_MASK 0x80 -@@ -1470,7 +1464,7 @@ - } - - static int --sioopen(dev_t dev, int flag, int mode, struct proc *p) -+sioopen(dev_t dev, int flag, int mode, struct thread *td) - { - struct com_s *com; - int error; -@@ -1528,7 +1522,7 @@ - } - } - if (tp->t_state & TS_XCLUDE && -- suser(p)) { -+ suser(td)) { - error = EBUSY; - goto out; - } -@@ -1639,7 +1633,7 @@ - } - - static int --sioclose(dev_t dev, int flag, int mode, struct proc *p) -+sioclose(dev_t dev, int flag, int mode, struct thread *td) - { - struct com_s *com; - int mynor; -@@ -1906,8 +1900,7 @@ - if ((modem_status ^ com->last_modem_status) & MSR_DCD) { - tc = timecounter; - count = tc->tc_get_timecount(tc); -- pps_event(&com->pps, tc, count, -- (modem_status & MSR_DCD) ? -+ pps_event(&com->pps, (modem_status & MSR_DCD) ? - PPS_CAPTUREASSERT : PPS_CAPTURECLEAR); - } - } -@@ -2053,7 +2046,7 @@ - } - - static int --sioioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) -+sioioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) - { - struct com_s *com; - int error; -@@ -2084,7 +2077,7 @@ - } - switch (cmd) { - case TIOCSETA: -- error = suser(p); -+ error = suser(td); - if (error != 0) - return (error); - *ct = *(struct termios *)data; -@@ -2134,7 +2127,7 @@ - if (lt->c_ospeed != 0) - dt->c_ospeed = tp->t_ospeed; - } -- error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p); -+ error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, td); - if (error != ENOIOCTL) - return (error); - s = splfunc(); -@@ -2175,7 +2168,7 @@ - break; - case TIOCMSDTRWAIT: - /* must be root since the wait applies to following logins */ -- error = suser(p); -+ error = suser(td); - if (error != 0) { - splx(s); - return (error); diff --git a/comms/ltmdm/files/patch-aa b/comms/ltmdm/files/patch-aa new file mode 100644 index 000000000000..73909e8e71e8 --- /dev/null +++ b/comms/ltmdm/files/patch-aa @@ -0,0 +1,14 @@ +--- sys/dev/ltmdm/ltmdmsio.c-0.7 Sun Mar 10 23:16:17 2002 ++++ sys/dev/ltmdm/ltmdmsio.c Thu Apr 4 23:40:35 2002 +@@ -124,8 +124,10 @@ + #endif + + #if __FreeBSD_version >= 500023 /* >= 20010912 */ +-#define proc thread /* temporary hack: struct proc -> stuct thread */ ++#define proc thread /* XXX struct proc -> stuct thread */ ++#if __FreeBSD_version < 500033 /* < 20020401 */ + #define suser(p) suser_td(p) ++#endif + #endif + + diff --git a/comms/ltmdm/files/patch-ab b/comms/ltmdm/files/patch-ab new file mode 100644 index 000000000000..9d812ab63499 --- /dev/null +++ b/comms/ltmdm/files/patch-ab @@ -0,0 +1,93 @@ +--- sys/dev/ltmdm/ltmdmsio.c-0.7.1 Thu Apr 4 23:40:35 2002 ++++ sys/dev/ltmdm/ltmdmsio.c Sun Apr 28 23:43:29 2002 +@@ -69,9 +69,13 @@ + #include <machine/bus.h> + #include <sys/rman.h> + #if __FreeBSD_version >= 500000 ++#if __FreeBSD_version < 500034 /* < 20020426 */ + #include <sys/timetc.h> + #endif ++#endif ++#ifdef ENABLE_PPS + #include <sys/timepps.h> ++#endif + + #include <pci/pcireg.h> + #include <pci/pcivar.h> +@@ -258,7 +262,9 @@ + bool_t do_dcd_timestamp; + struct timeval timestamp; + struct timeval dcd_timestamp; ++#ifdef ENABLE_PPS + struct pps_state pps; ++#endif + + u_long bytes_in; /* statistics */ + u_long bytes_out; +@@ -1297,8 +1303,11 @@ + DPRINTF(1,(" x_chip_version = %d\n", x_chip_version)); + + com->flags = flags; ++ ++#ifdef ENABLE_PPS + com->pps.ppscap = PPS_CAPTUREASSERT | PPS_CAPTURECLEAR; + pps_init(&com->pps); ++#endif + + /* + * initialize the device registers as follows: +@@ -1687,7 +1696,9 @@ + s = splfunc(); + com->do_timestamp = FALSE; + com->do_dcd_timestamp = FALSE; ++#ifdef ENABLE_PPS + com->pps.ppsparam.mode = 0; ++#endif + write_vuart_port(UART_CFCR, com->cfcr_image &= ~CFCR_SBREAK); + { + write_vuart_port(UART_IER, 0); +@@ -1896,23 +1907,34 @@ + u_char recv_data; + u_char int_ctl; + u_char int_ctl_new; ++#ifdef ENABLE_PPS ++#if __FreeBSD_version < 500034 + struct timecounter *tc; + u_int count; ++#endif ++#endif + + int_ctl = read_vuart_port(UART_IER); + int_ctl_new = int_ctl; + + while (!com->gone) { ++#ifdef ENABLE_PPS + if (com->pps.ppsparam.mode & PPS_CAPTUREBOTH) { + modem_status = read_vuart_port(UART_MSR); + if ((modem_status ^ com->last_modem_status) & MSR_DCD) { ++#if __FreeBSD_version < 500034 + tc = timecounter; + count = tc->tc_get_timecount(tc); + pps_event(&com->pps, tc, count, ++#else ++ pps_capture(&com->pps); ++ pps_event(&com->pps, ++#endif + (modem_status & MSR_DCD) ? + PPS_CAPTUREASSERT : PPS_CAPTURECLEAR); + } + } ++#endif + line_status = read_vuart_port(UART_LSR); + + /* input event? (check first to help avoid overruns) */ +@@ -2197,7 +2219,9 @@ + break; + default: + splx(s); ++#ifdef ENABLE_PPS + error = pps_ioctl(cmd, data, &com->pps); ++#endif + if (error == ENODEV) + error = ENOTTY; + return (error); diff --git a/comms/ltmdm/files/patch-ac b/comms/ltmdm/files/patch-ac new file mode 100644 index 000000000000..8963fe790a78 --- /dev/null +++ b/comms/ltmdm/files/patch-ac @@ -0,0 +1,39 @@ +--- ltmdm.sh.orig Wed Mar 13 12:36:38 2002 ++++ ltmdm.sh Wed Mar 13 12:36:38 2002 +@@ -1,36 +0,0 @@ +-#!/bin/sh +- +-PREFIX=/usr/local +-LTMDM_DEV_MAJOR=228 +-HAVEDEVFS=`mount | awk '{print $4}' | grep devfs | wc -l` +-HAVEDEVFS=`echo $HAVEDEVFS` +- +-case "$1" in +- restart) +- $0 stop +- sleep 2 +- $0 start +- ;; +- stop) +- if [ $HAVEDEVFS -eq 0 ]; then +- rm -f /dev/cual0 /dev/cuail0 /dev/cuall0 /dev/ttyl0 /dev/ttyil0 /dev/ttyll0 +- fi +- kldstat -n ltmdm 2>/dev/null >/dev/null && kldunload ltmdm +- ;; +- start) +- if [ $HAVEDEVFS -eq 0 ]; then +- rm -f /dev/cual0 /dev/cuail0 /dev/cuall0 /dev/ttyl0 /dev/ttyil0 /dev/ttyll0 +- umask 7 +- mknod /dev/cual0 c $LTMDM_DEV_MAJOR 128 uucp:dialer +- mknod /dev/cuail0 c $LTMDM_DEV_MAJOR 160 uucp:dialer +- mknod /dev/cuall0 c $LTMDM_DEV_MAJOR 192 uucp:dialer +- umask 77 +- mknod /dev/ttyl0 c $LTMDM_DEV_MAJOR 0 root:wheel +- mknod /dev/ttyil0 c $LTMDM_DEV_MAJOR 32 root:wheel +- mknod /dev/ttyll0 c $LTMDM_DEV_MAJOR 64 root:wheel +- fi +- +- kldstat -n ltmdm 2>/dev/null >/dev/null || kldload $PREFIX/share/ltmdm/ltmdm.ko +- echo -n ' ltmdm' +- ;; +-esac diff --git a/comms/ltmdm/files/patch-ad b/comms/ltmdm/files/patch-ad new file mode 100644 index 000000000000..cea72cc0df18 --- /dev/null +++ b/comms/ltmdm/files/patch-ad @@ -0,0 +1,14 @@ +================================================================================ +--- sys/dev/ltmdm/ltmdmsio.c.orig ++++ sys/dev/ltmdm/ltmdmsio.c +@@ -2822,7 +2822,7 @@ + #endif + + DRIVER_MODULE(ltmdm, pci, ltmdm_pci_driver, ltmdm_devclass, ltmdm_event, 0); +-#if 0 ++#if 1 + #if __FreeBSD_version >= 500000 + DRIVER_MODULE(ltmdm, cardbus, ltmdm_pci_driver, ltmdm_devclass, ltmdm_event, 0); + #endif +================================================================================ + diff --git a/comms/ltmdm/pkg-descr b/comms/ltmdm/pkg-descr index 741d4687fa5b..feceace209a0 100644 --- a/comms/ltmdm/pkg-descr +++ b/comms/ltmdm/pkg-descr @@ -4,7 +4,6 @@ chipset. It consists of a shim for the Linux binary only object file. I have tested this code on a Dell Inspiron 8000, and a Mitsubishi Diamond Voice internal PCI modem. Mr Watanabe has tested it on a ThinkPad i1124. -The shim code was written Watanabe Kiyoshi <aab10490@pop16.odn.net.jp>, see -WWW: http://www.geocities.com/wtnbkysh/ +The shim code was written Watanabe Kiyoshi <aab10490@pop16.odn.net.jp> Home page of the Linux driver :- http://www.heby.de/ltmodem |