Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Aug 1998 20:14:56 +0200
From:      Ignatios Souvatzis <is@jocelyn.rhein.de>
To:        freebsd-isdn@FreeBSD.ORG
Subject:   Re: Amiga patches
Message-ID:  <19980818201456.B1914@jocelyn.rhein.de>
In-Reply-To: <19980818153753.C594@jocelyn.rhein.de>; from Ignatios Souvatzis on Tue, Aug 18, 1998 at 03:37:53PM %2B0200
References:  <19980818153753.C594@jocelyn.rhein.de>

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

--sdtB3X0nJg68CQEu
Content-Type: text/plain; charset=us-ascii

On Tue, Aug 18, 1998 at 03:37:53PM +0200, I wrote:

> I did lots of installs and deinstalls until I could do it without manual
> tweaking. (Note the deinstall script added to the NetBSD/ ... cp -R /sys takes
> much too long).

etc. Apparently, I forgot the actual diffs. here they are:



--sdtB3X0nJg68CQEu
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="i4b.diff.amiga"

diff --exclude=CVS --unidirectional-new-file -c -r /build2/ref/NetBSD/INSTALLATION ./NetBSD/INSTALLATION
*** /build2/ref/NetBSD/INSTALLATION	Tue Jun 16 15:55:36 1998
--- ./NetBSD/INSTALLATION	Tue Aug 18 14:34:27 1998
***************
*** 3,21 ****
                      ISDN4BSD installation on NetBSD 1.3.1
                      =====================================
  
!                   last edit-date: [Tue Jun 16 15:56:29 1998]
  
  --------------------------------------------------------------------------------
  
  1) extract the isdn4bsd distribution, usually under /usr/src/i4b.
  
  
! 2) cd to /usr/src/i4b/NetBSD and adjust the file install-NetBSD.sh
!    to your needs. You do have to set the path to the kernel source
!    tree. Run the script as root. This will patch your kernel source
!    tree and insert links at the appropriate places to your isdn4bsd
!    distribution.
! 
  
  3) If you are through the first time, create device in /dev by
     running
--- 3,21 ----
                      ISDN4BSD installation on NetBSD 1.3.1
                      =====================================
  
!                   last edit-date: [Tue Aug 18 14:32:45 MEST 1998
  
  --------------------------------------------------------------------------------
  
  1) extract the isdn4bsd distribution, usually under /usr/src/i4b.
  
  
! 2) cd to /usr/src/i4b/NetBSD and adjust the files install-NetBSD.sh
!    and deinstall-netbsd.sh to your needs. You do have to set the path
!    to the kernel source tree ($DST), and for deinstallation a path to an
!    unchanged kernel source tree ($SYS). Run the script as root. This will
!    patch the kernel source tree at $DST and insert links at the appropriate
!    places to your isdn4bsd distribution.
  
  3) If you are through the first time, create device in /dev by
     running
***************
*** 27,33 ****
  4) cd to /usr/src/i4b, and run "make depend", "make" and "make install".
  
  
! 5) add the following to your kernel config file in /usr/src/sys/i386/conf:
  
  
  #---------------------------------------------------------------------
--- 27,37 ----
  4) cd to /usr/src/i4b, and run "make depend", "make" and "make install".
  
  
! 5a) for ISA machines (currently tested: i386 and Atari),
!     add the following to your kernel config file in $DST/$ARCH/conf:
! 
!     [replace $ARCH by your architecture identifier, e.g., i386 or atari,
!     and $DST by the directory where the patches kernel tree lives]
  
  
  #---------------------------------------------------------------------
***************
*** 74,86 ****
  # synchronous PPP over ISDN
  pseudo-device	i4bisppp	2
  #---------------------------------------------------------------------
  
  
! 6) uncomment the appropriate "device isic0 ..." entry for your ISDN card
!    from the above text in your kernel config file and edit the port, iomem
!    and irq fields to match your hardware setup.
!    
!    PLEASE NOTE: at the moment it is *NOT* possible to leave out any of
     the pseudo-devices listed above. So even if you don't need i4bipr
     you have to include it in your kernel - otherwise it would not link.
  
--- 78,111 ----
  # synchronous PPP over ISDN
  pseudo-device	i4bisppp	2
  #---------------------------------------------------------------------
+    uncomment the appropriate "device isic0 ..." entry for your ISDN
+    card from the above text in your kernel config file and edit the
+    port, iomem and irq fields to match your hardware setup.
+ 
+ 5b) for the Amiga (and DraCo), add the following lines to your kernel
+ configuration file in $DST/arch/amiga/conf/:
+ 
+ #---------------------------------------------------------------------
+ # i4b hardware support (isic - I4b Siemens Isdn Chipset driver)
+ isic0 at supio? port ?
  
+ pseudo-device	"i4b"
+ # userland driver to do ISDN tracing
+ pseudo-device   "i4btrc"
+ # userland driver to control the whole thing
+ pseudo-device   "i4bctl"
+ # userland driver for access to raw B channel
+ pseudo-device   "i4brbch"       4
+ # userland driver for telephony
+ pseudo-device   "i4btel"        2
+ # network driver for IP over raw HDLC ISDN
+ options IPR_VJ			# compile support for VJ compression
+ pseudo-device   "i4bipr"	2
+ # synchronous PPP over ISDN
+ pseudo-device	i4bisppp	2
+ #---------------------------------------------------------------------
  
! 6) PLEASE NOTE: at the moment it is *NOT* possible to leave out any of
     the pseudo-devices listed above. So even if you don't need i4bipr
     you have to include it in your kernel - otherwise it would not link.
  
diff --exclude=CVS --unidirectional-new-file -c -r /build2/ref/NetBSD/MAKEDEV.i4b ./NetBSD/MAKEDEV.i4b
*** /build2/ref/NetBSD/MAKEDEV.i4b	Thu Apr 23 13:51:29 1998
--- ./NetBSD/MAKEDEV.i4b	Mon Aug 17 22:37:13 1998
***************
*** 12,17 ****
--- 12,23 ----
  	i4brbch_major=46
  	i4btel_major=48
  	i4btrc_major=47
+ elif [ "$ARCH" = "amiga" ]; then
+ 	i4b_major=44
+ 	i4bctl_major=45
+ 	i4brbch_major=46
+ 	i4btel_major=48
+ 	i4btrc_major=47
  else
  	echo "ARCH $ARCH not supported!"
  fi
diff --exclude=CVS --unidirectional-new-file -c -r /build2/ref/NetBSD/deinstall-netbsd.sh ./NetBSD/deinstall-netbsd.sh
*** /build2/ref/NetBSD/deinstall-netbsd.sh	Thu Jan  1 01:00:00 1970
--- ./NetBSD/deinstall-netbsd.sh	Tue Aug 18 15:17:11 1998
***************
*** 0 ****
--- 1,67 ----
+ #!/bin/sh
+ #---------------------------------------------------------------------------
+ #
+ #	i4b deinstallation script
+ #	-----------------------
+ #
+ #	last edit-date: [Sun Aug 16 19:52:35 MEST 1998]
+ #
+ #	-is	tired to do it again and again....
+ #
+ #---------------------------------------------------------------------------
+ 
+ #---------------------------------------------------------------------------
+ # Carefully adjust the values below. Then run this script from the
+ # i4b/NetBSD directory as root. After this, you should have your original
+ # sys tree back, ready to do another ``sh install-netbsd.sh'' (e.g., from
+ # a new i4b distribution).
+ 
+ # The directory where the i4b distribution lives
+ SRC=`(cd ..; pwd)`
+ 
+ # The directory where an _unchanged_ /sys tree lives
+ SYS=/usr/src/sys
+ 
+ # Where the patched copy of your /usr/src/sys source tree lives. This is the
+ # copy modified to support i4b copy of your kernel sources.
+ DST=/build2/sys3
+ 
+ #---------------------------------------------------------------------------
+ # YOU SHOULD NOT NEED TO CHANGE ANYTHING BELOW...
+ #
+ # This works with the NetBSD 1.3 release.
+ #---------------------------------------------------------------------------
+ ISDN=$DST/i4b
+ 
+ if [ -d $ISDN ]
+ then
+ 	rm -rf $ISDN
+ fi
+ 
+ ( cd $DST/arch/amiga/dev && rm isic_supio.c )
+ ( cd $DST/dev/isa && rm isa_isic.c isadaic.c )
+ ( cd $DST/dev/ic && rm daic*.[hc] )
+ ( cd $DST/dev/isapnp && rm isapnp_isic.c )
+ ( cd $DST/dev/microcode && rm -rf daic )
+ 
+ # ---------------------------------------------------------------------------- 
+ # Machine independed config file changes...
+ # ---------------------------------------------------------------------------- 
+ 
+ cd $DST/conf || exit 1
+ cp $SYS/conf/files .
+ 
+ # ---------------------------------------------------------------------------- 
+ # Machine (architecture) specific patches follow...
+ # ---------------------------------------------------------------------------- 
+ 
+ ARCH=`machine`
+ if [ -f $SRC/NetBSD/sys-deinstall.$ARCH ]
+ then
+ 	. $SRC/NetBSD/sys-deinstall.$ARCH
+ else
+ 	echo "Unfortunately for your architecture no sys/config deinstall
+ 	echo "support has been added to i4b. It is easy to do, have a look
+ 	echo "at the echo existing stuff, create one for $ARCH and mail it to"
+ 	echo "Martin Husemann (martin@rumolt.teuto.de)"
+ fi
diff --exclude=CVS --unidirectional-new-file -c -r /build2/ref/NetBSD/files.i4b ./NetBSD/files.i4b
*** /build2/ref/NetBSD/files.i4b	Tue Mar 10 14:57:41 1998
--- ./NetBSD/files.i4b	Tue Aug 18 14:23:26 1998
***************
*** 1,7 ****
  # Config file and device description for machine-independend ISDN code.
! # Included by ports that need it. (To prevent scatering changes througout
! # the config files there are parts at the end of this file which belong
! # elswhere!)
  
  define isdn		# the ISDN subsystem
  define passive_isdn	# files needed by passive cards
--- 1,7 ----
  # Config file and device description for machine-independend ISDN code.
! # Included by ports that need it.
! # The ISA and ISAPNP specific parts are in their own file now.
! # ZBUS (rather: supio) parts are directly patched into files.amiga
  
  define isdn		# the ISDN subsystem
  define passive_isdn	# files needed by passive cards
***************
*** 52,67 ****
  device daic: isdn
  file dev/ic/daic.c	daic
  
- #this belongs to dev/isa/files.isa:
- attach isic at isa with isa_isic
- file dev/isa/isa_isic.c              isa_isic
- attach daic at isa with isa_daic
- file dev/isa/isadaic.c		     isa_daic
- 
- # this belongs to dev/isapnp/files.isapnp:
- attach isic at isapnp with isapnp_isic
- file dev/isapnp/isapnp_isic.c        isapnp_isic
- 
  file i4b/layer1/i4b_isic.c           isic    needs-count
  file i4b/layer1/i4b_tel_s08.c        isic    needs-flag
  file i4b/layer1/i4b_tel_s016.c       isic    needs-flag
--- 52,57 ----
***************
*** 76,78 ****
--- 66,69 ----
  file i4b/layer1/i4b_l1.c             isic    needs-flag
  file i4b/layer1/i4b_l1fsm.c          isic    needs-flag
  file i4b/layer1/i4b_bchan.c          isic    needs-flag
+ 
diff --exclude=CVS --unidirectional-new-file -c -r /build2/ref/NetBSD/files.i4b.isa ./NetBSD/files.i4b.isa
*** /build2/ref/NetBSD/files.i4b.isa	Thu Jan  1 01:00:00 1970
--- ./NetBSD/files.i4b.isa	Mon Aug 17 22:31:46 1998
***************
*** 0 ****
--- 1,13 ----
+ # Config file and device description for isa and isapnp.
+ # Included by ports that need it.
+ 
+ #this belongs to dev/isa/files.isa:
+ attach isic at isa with isa_isic
+ file dev/isa/isa_isic.c              isa_isic
+ attach daic at isa with isa_daic
+ file dev/isa/isadaic.c		     isa_daic
+ 
+ # this belongs to dev/isapnp/files.isapnp:
+ attach isic at isapnp with isapnp_isic
+ file dev/isapnp/isapnp_isic.c        isapnp_isic
+ 
diff --exclude=CVS --unidirectional-new-file -c -r /build2/ref/NetBSD/install-netbsd.sh ./NetBSD/install-netbsd.sh
*** /build2/ref/NetBSD/install-netbsd.sh	Sun Jun 14 20:08:54 1998
--- ./NetBSD/install-netbsd.sh	Tue Aug 18 15:16:37 1998
***************
*** 24,30 ****
  # Where the copy of your /usr/src/sys source tree lives. This copy is
  # modified to support i4b. You probably should not use your native /usr/src/sys
  # here! This working copy must exist, before you run this script!
! DST=/usr/src/sys-i4b
  
  #---------------------------------------------------------------------------
  # YOU SHOULD NOT NEED TO CHANGE ANYTHING BELOW...
--- 24,30 ----
  # Where the copy of your /usr/src/sys source tree lives. This copy is
  # modified to support i4b. You probably should not use your native /usr/src/sys
  # here! This working copy must exist, before you run this script!
! DST=/build2/sys3
  
  #---------------------------------------------------------------------------
  # YOU SHOULD NOT NEED TO CHANGE ANYTHING BELOW...
***************
*** 48,53 ****
--- 48,54 ----
  ln -s $SRC/NetBSD/files.i4b $ISDN
  ( cd $ISDN && ln -s $SRC/machine/*.h . )
  
+ ( cd $DST/arch/amiga/dev && ln -s $SRC/layer1/isic_supio.c . )
  ( cd $DST/dev/isa && ln -s $SRC/layer1/isa_isic.c . )
  ( cd $DST/dev/isa && ln -s $SRC/diehl/isadaic.c . )
  ( cd $DST/dev/ic && ln -s $SRC/diehl/daic*.[hc] . )
diff --exclude=CVS --unidirectional-new-file -c -r /build2/ref/NetBSD/sys-deinstall.amiga ./NetBSD/sys-deinstall.amiga
*** /build2/ref/NetBSD/sys-deinstall.amiga	Thu Jan  1 01:00:00 1970
--- ./NetBSD/sys-deinstall.amiga	Tue Aug 18 14:19:36 1998
***************
*** 0 ****
--- 1,9 ----
+ #! /bin/sh
+ 
+ # Patches needed for the amiga architecture to add i4b kernel support
+ # Note: patches are for 1.3F dd. 1998 Jul 27
+ cd $DST/arch/amiga/conf || exit 1
+ cp $SYS/arch/amiga/conf/files.amiga .
+ 
+ cd $DST/arch/amiga/amiga || exit 1
+ cp $SYS/arch/amiga/amiga/conf.c .
diff --exclude=CVS --unidirectional-new-file -c -r /build2/ref/NetBSD/sys-patch.amiga ./NetBSD/sys-patch.amiga
*** /build2/ref/NetBSD/sys-patch.amiga	Thu Jan  1 01:00:00 1970
--- ./NetBSD/sys-patch.amiga	Mon Aug 17 22:34:06 1998
***************
*** 0 ****
--- 1,96 ----
+ #! /bin/sh
+ 
+ # Patches needed for the amiga architecture to add i4b kernel support
+ # Note: patches are for 1.3F dd. 1998 Jul 27
+ cd $DST/arch/amiga/conf || exit 1
+ patch << 'END_OF_PATCH'
+ *** /usr/src/sys/arch/amiga/conf/files.amiga	Wed Apr 22 10:30:45 1998
+ --- files.amiga	Wed Apr 22 10:50:23 1998
+ ***************
+ *** 195,197 ****
+ --- 195,205 ----
+   # SunOS Binary Compatibility (COMPAT_SUNOS)
+   include "compat/sunos/files.sunos"
+   file	arch/m68k/m68k/sunos_machdep.c	compat_sunos
+ + 
+ + # ------------------------------------------------------------
+ + # include ISDN support
+ + include "../../../i4b/files.i4b"
+ + 
+ + attach  isic at supio with isic_supio
+ + file    arch/amiga/dev/isic_supio.c isic_supio
+ + # ------------------------------------------------------------
+ END_OF_PATCH
+ 
+ cd $DST/arch/amiga/amiga || exit 1
+ patch << 'END_OF_PATCH'
+ --- /sys/arch/amiga/amiga/conf.c	Sun Jul  5 20:52:29 1998
+ +++ conf.c	Sun Aug 16 21:54:16 1998
+ @@ -102,6 +102,53 @@
+  #include "ipfilter.h"
+  #include "rnd.h"
+  
+ +/* open, close, ioctl */
+ +#define cdev_i4bctl_init(c,n) { \
+ +      dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
+ +      (dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
+ +      (dev_type_stop((*))) enodev, 0, seltrue, \
+ +      (dev_type_mmap((*))) enodev }
+ +
+ +/* open, close, read, write */
+ +#define       cdev_i4brbch_init(c,n) { \
+ +      dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
+ +      dev_init(c,n,write), (dev_type_ioctl((*))) enodev, \
+ +      (dev_type_stop((*))) enodev, \
+ +      0, (dev_type_poll((*))) enodev, (dev_type_mmap((*))) enodev }
+ +
+ +/* open, close, read, write */
+ +#define	cdev_i4btel_init(c,n) { \
+ +      dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
+ +      dev_init(c,n,write), (dev_type_ioctl((*))) enodev, \
+ +      (dev_type_stop((*))) enodev, 0, (dev_type_poll((*))) enodev, \
+ +      (dev_type_mmap((*))) enodev, D_TTY }
+ +
+ +/* open, close, read, ioctl */
+ +#define cdev_i4btrc_init(c,n) { \
+ +      dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
+ +      (dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
+ +      (dev_type_stop((*))) enodev, 0, (dev_type_poll((*))) enodev, \
+ +      (dev_type_mmap((*))) enodev }
+ +
+ +/* open, close, read, poll, ioctl */
+ +#define cdev_i4b_init(c,n) { \
+ +      dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
+ +      (dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
+ +      (dev_type_stop((*))) enodev, 0, dev_init(c,n,poll), \
+ +      (dev_type_mmap((*))) enodev }
+ +      
+ +
+ +#include "i4b.h"
+ +#include "i4bctl.h"
+ +#include "i4btrc.h"
+ +#include "i4brbch.h"
+ +#include "i4btel.h"
+ +cdev_decl(i4b);
+ +cdev_decl(i4bctl);
+ +cdev_decl(i4btrc);
+ +cdev_decl(i4brbch);
+ +cdev_decl(i4btel);
+ +
+  struct cdevsw	cdevsw[] =
+  {
+  	cdev_cn_init(1,cn),		/* 0: virtual console */
+ @@ -148,6 +195,12 @@
+  	cdev_audio_init(NAUDIO,audio),	/* 41: cc audio interface */
+  	cdev_rnd_init(NRND,rnd),	/* 42: random source pseudo-device */
+  	cdev_disk_init(NMD,md),		/* 43: memory disk */
+ +	/* i4b character devices */
+ +	cdev_i4b_init(NI4B, i4b),               /* 44: i4b main device */
+ +	cdev_i4bctl_init(NI4BCTL, i4bctl),      /* 45: i4b control device */
+ +	cdev_i4brbch_init(NI4BRBCH, i4brbch),   /* 46: i4b raw b-channel */
+ +	cdev_i4btrc_init(NI4BTRC, i4btrc),      /* 47: i4b trace device */
+ +	cdev_i4btel_init(NI4BTEL, i4btel),      /* 48: i4b phone device */
+  };
+  int	nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]);
+  
+ END_OF_PATCH
diff --exclude=CVS --unidirectional-new-file -c -r /build2/ref/NetBSD/sys-patch.atari ./NetBSD/sys-patch.atari
*** /build2/ref/NetBSD/sys-patch.atari	Thu Apr 23 13:51:30 1998
--- ./NetBSD/sys-patch.atari	Mon Aug 17 22:32:38 1998
***************
*** 9,15 ****
  --- files.atari	Wed Apr 22 10:50:23 1998
  ***************
  *** 195,197 ****
! --- 195,202 ----
    # SunOS Binary Compatibility (COMPAT_SUNOS)
    include "compat/sunos/files.sunos"
    file	arch/m68k/m68k/sunos_machdep.c	compat_sunos
--- 9,15 ----
  --- files.atari	Wed Apr 22 10:50:23 1998
  ***************
  *** 195,197 ****
! --- 195,203 ----
    # SunOS Binary Compatibility (COMPAT_SUNOS)
    include "compat/sunos/files.sunos"
    file	arch/m68k/m68k/sunos_machdep.c	compat_sunos
***************
*** 17,22 ****
--- 17,23 ----
  + # ------------------------------------------------------------
  + # include ISDN support
  + include "../../../i4b/files.i4b"
+ + include "../../../i4b/files.i4b.isa"
  + # ------------------------------------------------------------
  END_OF_PATCH
  
diff --exclude=CVS --unidirectional-new-file -c -r /build2/ref/NetBSD/sys-patch.i386 ./NetBSD/sys-patch.i386
*** /build2/ref/NetBSD/sys-patch.i386	Wed Jan 28 17:07:08 1998
--- ./NetBSD/sys-patch.i386	Mon Aug 17 22:32:56 1998
***************
*** 8,19 ****
  --- files.i386	Mon Oct 20 05:56:43 1997
  ***************
  *** 211,214 ****
! --- 211,219 ----
    include "../../../dev/mii/files.mii"
    
  + # ------------------------------------------------------------
  + # include ISDN support
  + include "../../../i4b/files.i4b"
  + # ------------------------------------------------------------
  + 
    # XXXX pcic here because it needs to be late.  The catch: pcic needs
--- 8,20 ----
  --- files.i386	Mon Oct 20 05:56:43 1997
  ***************
  *** 211,214 ****
! --- 211,220 ----
    include "../../../dev/mii/files.mii"
    
  + # ------------------------------------------------------------
  + # include ISDN support
  + include "../../../i4b/files.i4b"
+ + include "../../../i4b/files.i4b.isa"
  + # ------------------------------------------------------------
  + 
    # XXXX pcic here because it needs to be late.  The catch: pcic needs
diff --exclude=CVS --unidirectional-new-file -c -r /build2/ref/README ./README
*** /build2/ref/README	Fri Jul 10 10:49:01 1998
--- ./README	Tue Aug 18 15:22:20 1998
***************
*** 120,125 ****
--- 120,129 ----
  	Martin has NetBSD/i386 1.3 running and is supporting ISDN4BSD for
  	that platform as his time permits it.
  
+ NetBSD/Amiga:
+ 	The NetBSD/Atari 1.3F specific support was done by Ignatios Souvatzis,
+ 	(is@netbsd.org).
+ 
  NetBSD/Atari:
  	The NetBSD/Atari 1.3 specific support was done by Leo Weppelman,
  	(leo@wau.mis.ah.nl).
***************
*** 154,159 ****
--- 158,165 ----
    3Com/USR SportsterInt	full		full		( = Stollmann Tina-pp )
    Sedlbauer win speed	experimental	unsupported	(Note 9)
    Dynalink IS64PH	experimental	unsupported	(Note 11)
+   ISDN Blaster		unsupported	experimental	(Note 12)
+   ISDN Master		unsupported	experimental	(Note 12)
  
    Type (active)		FreeBSD		NetBSD/OpenBSD
    --------------------- -------		--------------
***************
*** 202,207 ****
--- 208,217 ----
  	Please contact him in case of trouble. This driver might also work 
  	for Asuscom cards.
  
+ Note 12: This driver was developed by Ignatios Souvatzis (is@netbsd.org)
+ 	Please contact him in case of trouble.
+ 	This driver is supposed to work on the ISDN Master versions and
+ 	lookalikes, like the ISDN Blaster.
  
  5. Where do i find documentation for ISDN4BSD ?
  -----------------------------------------------
diff --exclude=CVS --unidirectional-new-file -c -r /build2/ref/driver/i4b_ipr.c ./driver/i4b_ipr.c
*** /build2/ref/driver/i4b_ipr.c	Fri Jun 19 10:24:29 1998
--- ./driver/i4b_ipr.c	Thu Aug 13 15:23:48 1998
***************
*** 490,496 ****
--- 490,501 ----
  			{
  				/* disconnect ISDN line */
  
+ #if defined(__NetBSD__)
+ 				i4b_l4_drvrdisc(BDRV_IPR, sc->sc_unit);
+ #endif
+ #if defined(__FreeBSD__)
  				i4b_l4_drvrdisc(BDRV_IPR, ifp->if_unit);
+ #endif
  
  				/* sc->sc_if.if_flags &= ~IFF_RUNNING; */
  			}
diff --exclude=CVS --unidirectional-new-file -c -r /build2/ref/isdnd/Makefile ./isdnd/Makefile
*** /build2/ref/isdnd/Makefile	Thu Jun 18 16:46:37 1998
--- ./isdnd/Makefile	Thu Aug 13 15:23:13 1998
***************
*** 37,42 ****
--- 37,46 ----
  MAN      =	isdnd.8 isdnd.rc.5 isdnd.rates.5 isdnd.acct.5
  .endif
  
+ .if (${BSDTYPE} == "NetBSD")
+ YFLAGS += -d
+ .endif
+ 
  .if (${BSDTYPE} == "NetBSD" || ${BSDTYPE} == "OpenBSD" || \
          ${BSDTYPE} == "FreeBSD" && ${RELEASE} != "3.0-CURRENT")
  rc_scan.c:	rc_scan.l y.tab.h
diff --exclude=CVS --unidirectional-new-file -c -r /build2/ref/isdnd/curses.c ./isdnd/curses.c
*** /build2/ref/isdnd/curses.c	Wed Jul  8 20:50:06 1998
--- ./isdnd/curses.c	Tue Aug 18 12:56:04 1998
***************
*** 548,554 ****
  			continue;
  		}
  
! 		nlines = atoi((const char *)&ncols);
  
  		if ((nlines == 0) || (nlines > cnt))
  		{
--- 548,554 ----
  			continue;
  		}
  
! 		nlines = ncols - '0';
  
  		if ((nlines == 0) || (nlines > cnt))
  		{
diff --exclude=CVS --unidirectional-new-file -c -r /build2/ref/isdnd/isdnd.h ./isdnd/isdnd.h
*** /build2/ref/isdnd/isdnd.h	Wed Jul  8 17:46:08 1998
--- ./isdnd/isdnd.h	Mon Aug 17 14:42:25 1998
***************
*** 535,559 ****
  int got_unitlen;
  time_t unit_length;
  
! cfg_entry_t cfg_entry_tab[];
! isdn_ctrl_state_t isdn_ctrl_tab[ISDN_CTRL_MAX];
  
  int ncontroller;
  int nentries;
  
  int uselogfile;
! char logfile[];
  int logfacility;
  int nregex;
! struct rarr rarr[];
  
! char ratesfile[];
  char *rate_error;
  int got_rate;
  struct rates *rates[NRATES][NDAYS];		/* strange */
  
  int useacctfile;
! char acctfile[];
  FILE *acctfp;
  int acct_all;
  
--- 535,559 ----
  int got_unitlen;
  time_t unit_length;
  
! cfg_entry_t cfg_entry_tab[CFG_ENTRY_MAX];	/* configuration table */
! isdn_ctrl_state_t isdn_ctrl_tab[ISDN_CTRL_MAX];	/* controller states table */
  
  int ncontroller;
  int nentries;
  
  int uselogfile;
! char logfile[MAXPATHLEN];
  int logfacility;
  int nregex;
! struct rarr rarr[MAX_RE];
  
! char ratesfile[MAXPATHLEN];
  char *rate_error;
  int got_rate;
  struct rates *rates[NRATES][NDAYS];		/* strange */
  
  int useacctfile;
! char acctfile[MAXPATHLEN];
  FILE *acctfp;
  int acct_all;
  
diff --exclude=CVS --unidirectional-new-file -c -r /build2/ref/isdnd/rc_config.c ./isdnd/rc_config.c
*** /build2/ref/isdnd/rc_config.c	Wed Jul  8 14:26:53 1998
--- ./isdnd/rc_config.c	Thu Aug 13 15:23:13 1998
***************
*** 66,72 ****
  void
  configure(char *filename, int reread)
  {
! 	extern reset_scanner(FILE *inputfile);
  	
  	set_config_defaults();
  
--- 66,72 ----
  void
  configure(char *filename, int reread)
  {
! 	extern void reset_scanner(FILE *inputfile);
  	
  	set_config_defaults();
  
diff --exclude=CVS --unidirectional-new-file -c -r /build2/ref/layer1/i4b_isic.c ./layer1/i4b_isic.c
*** /build2/ref/layer1/i4b_isic.c	Mon Jul  6 16:14:24 1998
--- ./layer1/i4b_isic.c	Sun Aug 16 20:53:34 1998
***************
*** 74,81 ****
--- 74,85 ----
  #include <i386/isa/isa_device.h>
  #else
  #include <sys/device.h>
+ #if defined(__NetBSD__) && defined(amiga)
+ #include <machine/bus.h>
+ #else
  #include <dev/isa/isavar.h>
  #endif
+ #endif
  
  #ifdef __FreeBSD__
  #include <machine/i4b_debug.h>
***************
*** 440,445 ****
--- 444,455 ----
  			break;
  #endif
  
+ #ifdef amiga
+ 		case FLAG_BLMASTER:
+ 			ret = 1; /* full detection was done in caller */
+ 			break;
+ #endif
+ 
  		default:
  			break;
  	}
***************
*** 570,575 ****
--- 580,590 ----
  			drvid = "Sedlbauer win speed";
  			break;
  
+ 		case FLAG_BLMASTER:
+ 			/* board announcement was done by caller */
+ 			drvid = (char *)0;
+ 			break;
+ 
  		default:
  			drvid = "ERROR, unknown flag used";
  			break;
***************
*** 577,583 ****
  #ifndef __FreeBSD__
  	printf("\n");
  #endif
! 	printf(ISIC_FMT "%s\n", ISIC_PARM, drvid);
  
  	/* announce chip versions */
  	
--- 592,599 ----
  #ifndef __FreeBSD__
  	printf("\n");
  #endif
! 	if (drvid)
! 		printf(ISIC_FMT "%s\n", ISIC_PARM, drvid);
  
  	/* announce chip versions */
  	
diff --exclude=CVS --unidirectional-new-file -c -r /build2/ref/layer1/i4b_l1.h ./layer1/i4b_l1.h
*** /build2/ref/layer1/i4b_l1.h	Tue Jun 23 16:03:32 1998
--- ./layer1/i4b_l1.h	Sun Aug 16 20:56:39 1998
***************
*** 61,66 ****
--- 61,67 ----
  #define FLAG_SWS		0x18
  #define FLAG_AVM_A1_PCMCIA	0x20 /* set during PCMCIA card detection */
  #define FLAG_DYNALINK		0x21
+ #define FLAG_BLMASTER		0x22 /* set during ZBUS card detection */
  
  /*---------------------------------------------------------------------------
   *	number of supported units
***************
*** 375,380 ****
--- 376,382 ----
  
  #else /* not FreeBSD */
  
+ extern void isic_recover __P((struct isic_softc *sc));
  extern int isicattach __P((int flags, struct isic_softc *sc));
  extern int isicintr __P((void *));
  extern int isicprobe __P((struct isic_attach_args *ia));
diff --exclude=CVS --unidirectional-new-file -c -r /build2/ref/layer1/isic_supio.c ./layer1/isic_supio.c
*** /build2/ref/layer1/isic_supio.c	Thu Jan  1 01:00:00 1970
--- ./layer1/isic_supio.c	Sat Aug 15 21:21:51 1998
***************
*** 0 ****
--- 1,221 ----
+ /*
+  *   Copyright (c) 1998 Ignatios Souvatzis. All rights reserved.
+  *
+  *   Redistribution and use in source and binary forms, with or without
+  *   modification, are permitted provided that the following conditions
+  *   are met:
+  *
+  *   1. Redistributions of source code must retain the above copyright
+  *      notice, this list of conditions and the following disclaimer.
+  *   2. Redistributions in binary form must reproduce the above copyright
+  *      notice, this list of conditions and the following disclaimer in the
+  *      documentation and/or other materials provided with the distribution.
+  *   3. Neither the name of the author nor the names of any co-contributors
+  *      may be used to endorse or promote products derived from this software
+  *      without specific prior written permission.
+  *   4. Altered versions must be plainly marked as such, and must not be
+  *      misrepresented as being the original software and/or documentation.
+  *   
+  *   THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+  *   ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  *   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  *   ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+  *   FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+  *   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+  *   OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+  *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+  *   LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+  *   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+  *   SUCH DAMAGE.
+  *
+  *---------------------------------------------------------------------------
+  *
+  *	isic_supio.c - Amiga supio pseudo bus frontend for i4b_isic driver
+  *	supports:
+  *		- ISDN Blaster	5001/1
+  *		- ISDN Master	2092/64
+  *	But we attach to the supio, so just see "isic".
+  *	----------------------------------------------------------
+  *
+  *	$Id$ 
+  *
+  *      last edit-date: [Wed Jul 22 23:42:59 MEST 1998]
+  *
+  *	-is	original implementation
+  *
+  *---------------------------------------------------------------------------*/
+ 
+ #include <sys/types.h>
+ #include <sys/param.h>
+ #include <sys/errno.h>
+ #include <sys/syslog.h>
+ #include <sys/device.h>
+ #include <sys/socket.h>
+ #include <net/if.h>
+ #include <sys/systm.h>
+ #include <sys/malloc.h>
+ 
+ #include <machine/cpu.h>
+ #include <machine/intr.h>
+ #include <machine/bus.h>
+ 
+ #include <amiga/dev/supio.h>
+ 
+ #include <i4b/i4b_ioctl.h>
+ #include <i4b/layer1/i4b_l1.h>
+ #include <i4b/layer1/i4b_hscx.h>
+ 
+ /*static*/ int isic_supio_match __P((struct device *, struct cfdata *, void *));
+ /*static*/ void isic_supio_attach __P((struct device *, struct device *, void *));
+ 
+ /*static*/ u_int8_t aster_read_reg __P((struct isic_softc *sc, int what,
+ 	bus_size_t offs));
+ /*static*/ void aster_write_reg __P((struct isic_softc *sc, int what,
+ 	bus_size_t offs, u_int8_t data));
+ /*static*/ void aster_read_fifo __P((struct isic_softc *sc, int what,
+ 	void *buf, size_t size));
+ /*static*/ void aster_write_fifo __P((struct isic_softc *sc, int what,
+ 	const void *data, size_t size));
+ 
+ struct isic_supio_softc {
+ 	struct isic_softc	sc_isic;
+ 	struct isr		sc_isr;
+ 	struct bus_space_tag	sc_bst;
+ };
+ 
+ struct cfattach isic_supio_ca = {
+ 	sizeof(struct isic_supio_softc), isic_supio_match, isic_supio_attach
+ };
+ 
+ /*
+  * Probe card
+  */
+ /*static*/ int
+ isic_supio_match(parent, cf, aux)
+ 	struct device *parent;
+ 	struct cfdata *cf;
+ 	void *aux;
+ {
+ 	struct supio_attach_args *sap = aux;
+ 
+ 	/* ARGSUSED */
+ 	return (!strcmp("isic", sap->supio_name));
+ }
+ 
+ int isic_supio_ipl = 2;
+ /*
+  * Attach the card
+  */
+ /*static*/ void
+ isic_supio_attach(parent, self, aux)
+ 	struct device *parent, *self;
+ 	void *aux;
+ {
+ 	struct isic_supio_softc *ssc = (void *)self;
+ 	struct isic_softc *sc = &ssc->sc_isic;
+ 	struct supio_attach_args *sap = aux;
+ 
+ 	bus_space_tag_t bst;
+ 	bus_space_handle_t h;
+ 
+ 	/* setup parameters */
+ 	sc->sc_cardtyp = CARD_TYPEP_BLMASTER;
+ 	sc->sc_num_mappings = 3;
+ 	sc->sc_unit = sc->sc_dev.dv_unit;	/* XXX ??? */
+ 
+ 	/* create io mappings */
+ 	MALLOC_MAPS(sc);
+ 
+ 	bst = sap->supio_iot;
+ 	bus_space_map(bst, sap->supio_iobase, 0x400, 0, &h);
+ 
+ 	/* ISAC */
+ 	sc->sc_maps[0].t = bst;
+ 	sc->sc_maps[0].h = h;
+ 	sc->sc_maps[0].offset = 0x300/2;
+ 	sc->sc_maps[0].size = 0;	/* foreign mapping, leave it alone */
+ 
+ 	/* HSCX A */
+ 	sc->sc_maps[1].t = bst;
+ 	sc->sc_maps[1].h = h;
+ 	sc->sc_maps[1].offset = 0x100/2;
+ 	sc->sc_maps[1].size = 0;	/* foreign mapping, leave it alone */
+ 
+ 	/* HSCX B */
+ 	sc->sc_maps[2].t = bst;
+ 	sc->sc_maps[2].h = h;
+ 	sc->sc_maps[2].offset = 0x180/2;
+ 	sc->sc_maps[2].size = 0;	/* foreign mapping, leave it alone */
+ 
+         sc->readreg = aster_read_reg;
+         sc->writereg = aster_write_reg;
+         sc->readfifo = aster_read_fifo;
+         sc->writefifo = aster_write_fifo;
+ 
+         /* setup card type */
+         sc->sc_cardtyp = CARD_TYPEP_BLMASTER;
+ 	sc->sc_bustyp = BUS_TYPE_IOM2;
+ 
+ 	/* enable RTS on HSCX A */
+ 	aster_write_reg(sc, ISIC_WHAT_HSCXA, H_MODE, HSCX_MODE_RTS);
+ 
+ 	/* MI initialization of card */
+ 
+ 	isicattach(FLAG_BLMASTER, sc);
+ 
+  	ssc->sc_isr.isr_intr = isicintr;
+ 	ssc->sc_isr.isr_arg = sc;
+ 	ssc->sc_isr.isr_ipl = isic_supio_ipl;	/* XXX */
+ 	add_isr(&ssc->sc_isr);
+ }
+ 
+ #if 0
+ int
+ isic_supiointr(p)
+ 	void *p;
+ {
+ 	/* XXX should test whether it is our interupt at all */
+         add_sicallback((sifunc_t)isicintr, p, NULL);
+ 	return 1;
+ }
+ #endif
+ 
+ /*static*/ void
+ aster_read_fifo(struct isic_softc *sc, int what, void *buf, size_t size)
+ {
+         bus_space_tag_t t = sc->sc_maps[what].t;
+ 	bus_space_handle_t h = sc->sc_maps[what].h;
+ 	bus_size_t o = sc->sc_maps[what].offset;
+ 
+ 	bus_space_read_multi_1(t, h, o, buf, size);
+ }
+ 
+ /*static*/ void
+ aster_write_fifo(struct isic_softc *sc, int what, const void *buf, size_t size)
+ {
+         bus_space_tag_t t = sc->sc_maps[what].t;
+ 	bus_space_handle_t h = sc->sc_maps[what].h;
+ 	bus_size_t o = sc->sc_maps[what].offset;
+ 
+ 	bus_space_write_multi_1(t, h, o, (u_int8_t*)buf, size);
+ }
+ 
+ /*static*/ u_int8_t
+ aster_read_reg(struct isic_softc *sc, int what, bus_size_t offs)
+ {
+         bus_space_tag_t t = sc->sc_maps[what].t;
+         bus_space_handle_t h = sc->sc_maps[what].h;
+         bus_size_t o = sc->sc_maps[what].offset;
+ 
+         return bus_space_read_1(t, h, o + offs);
+ }
+ 
+ /*static*/ void
+ aster_write_reg(struct isic_softc *sc, int what, bus_size_t offs, u_int8_t data) 
+ {
+         bus_space_tag_t t = sc->sc_maps[what].t;
+ 	bus_space_handle_t h = sc->sc_maps[what].h;
+ 	bus_size_t o = sc->sc_maps[what].offset;
+ 
+ 	bus_space_write_1(t, h, o + offs, data);
+ }
diff --exclude=CVS --unidirectional-new-file -c -r /build2/ref/machine/i4b_ioctl.h ./machine/i4b_ioctl.h
*** /build2/ref/machine/i4b_ioctl.h	Thu Jul  9 15:19:50 1998
--- ./machine/i4b_ioctl.h	Sun Aug 16 21:02:49 1998
***************
*** 93,98 ****
--- 93,99 ----
  #define CARD_TYPEP_DRNNGO	8	/* Dr. Neuhaus Niccy GO@	*/
  #define CARD_TYPEP_SWS		9	/* Sedlbauer Win Speed		*/
  #define CARD_TYPEP_DYNALINK	10	/* Dynalink IS64PH		*/
+ #define CARD_TYPEP_BLMASTER     11      /* ISDN Blaster / ISDN Master   */
  /*
   * in case you add support for more cards, please update:
   *
***************
*** 102,108 ****
   * and adjust CARD_TYPEP_MAX below.
   */
  
! #define CARD_TYPEP_MAX		10	/* max type */
  
  /*---------------------------------------------------------------------------*
   *	card types for CTRL_DAIC
--- 103,109 ----
   * and adjust CARD_TYPEP_MAX below.
   */
  
! #define CARD_TYPEP_MAX		11	/* max type */
  
  /*---------------------------------------------------------------------------*
   *	card types for CTRL_DAIC
diff --exclude=CVS --unidirectional-new-file -c -r /build2/ref/sppp/if_spppsubr.c ./sppp/if_spppsubr.c
*** /build2/ref/sppp/if_spppsubr.c	Sun May 31 20:10:26 1998
--- ./sppp/if_spppsubr.c	Thu Aug 13 15:23:49 1998
***************
*** 28,33 ****
--- 28,41 ----
  #endif
  
  #include <sys/param.h>
+ 
+ #ifdef NetBSD1_3
+ #  if NetBSD1_3 > 6
+ #	include "opt_inet.h"
+ #	include "opt_iso.h"
+ #  endif
+ #endif
+ 
  #include <sys/systm.h>
  #include <sys/kernel.h>
  #include <sys/sockio.h>

--sdtB3X0nJg68CQEu--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isdn" in the body of the message



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