Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Aug 2001 18:42:50 +0200
From:      "S Looman" <steve__l__@hotmail.com>
To:        freebsd-isdn@freebsd.org
Subject:   Compaq Microcom 610
Message-ID:  <F135EcsbUelMSGriY76000131fd@hotmail.com>

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

I've added support for the Compaq Microcom 610 ISDN card, also known as: 
Compaq series PSB2222I, i guess.

After my previous attempt to build support for this card I last interest for 
a few months. Yesterday I started again and in about 1 hour I had it working 
:)
I haven't tested it fully yet, just the answering machine thingie. But I 
guess it works since the card is very familliar to the Teles 
16.3PnP(according to the linux source).

Steve

PS.
I am not able to use my normal address: <fsteevie@dds.nl> , so if you need 
to contact me personally reply to this message...

PPS.
Hotmail does not seem to accept my attachment, so here is the patch in the 
patch:

--- CUT FROM HERE ---
*** /usr/src/sys/conf/options.i386.orig	Mon Aug 27 16:58:10 2001
--- /usr/src/sys/conf/options.i386	Mon Aug 27 16:59:18 2001
***************
*** 167,172 ****
--- 167,173 ----
  ELSA_QS1ISA		opt_i4b.h
  SIEMENS_ISURF2		opt_i4b.h
  EICON_DIVA		opt_i4b.h
+ COMPAQ_M610		opt_i4b.h
  # -------------------------------
  # isdn4bsd: passive PCI cards
  # -------------------------------
*** /usr/src/sys/i4b/layer1/isic/i4b_ctx_s0P.c.orig	Mon Aug 27 16:57:41 2001
--- /usr/src/sys/i4b/layer1/isic/i4b_ctx_s0P.c	Mon Aug 27 17:13:58 2001
***************
*** 43,49 ****
  #include "isic.h"
  #include "opt_i4b.h"

! #if (NISIC > 0) && (defined(CRTX_S0_P) || defined(TEL_S0_16_3_P))

  #include <sys/param.h>
  #include <sys/systm.h>
--- 43,49 ----
  #include "isic.h"
  #include "opt_i4b.h"

! #if (NISIC > 0) && (defined(CRTX_S0_P) || defined(TEL_S0_16_3_P) || 
defined(COMPAQ_M610))

  #include <sys/param.h>
  #include <sys/systm.h>
***************
*** 109,114 ****
--- 109,115 ----
  {
  	u_int32_t iobase1;
  	u_int32_t iobase2;
+ 	u_int32_t iocfg;
  	int unit = device_get_unit(dev);
  	struct l1_softc *sc = &l1_sc[unit];
  	bus_space_tag_t t;
***************
*** 131,155 ****
  		return ENXIO;
  	}

! 	/* remember the io base addresses */

! 	iobase1 = rman_get_start(sc->sc_resources.io_base[0]);
! 	iobase2 = rman_get_start(sc->sc_resources.io_base[1]);

  	/*
  	 * because overlapping resources are invalid,
! 	 * release the first io port resource
  	 */

          bus_release_resource(dev, SYS_RES_IOPORT, 
sc->sc_resources.io_rid[0],
  			sc->sc_resources.io_base[0]);

  	/* set and allocate a base io address for the ISAC chip */

  	sc->sc_resources.io_rid[2] = 2;

  	bus_set_resource(dev, SYS_RES_IOPORT, 2, iobase1-0x20, 0x40);
!
  	if(!(sc->sc_resources.io_base[2] =
  		bus_alloc_resource(dev, SYS_RES_IOPORT,
  				   &sc->sc_resources.io_rid[2],
--- 132,192 ----
  		return ENXIO;
  	}

! 	/*
! 	 * Compaq M610 has a cfg io area,
! 	 * we need it
! 	 */
!
! 	if (sc->sc_cardtyp == CARD_TYPEP_COMPAQ_M610)
! 	{
! 		sc->sc_resources.io_rid[2] = 2;

! 		if(!(sc->sc_resources.io_base[2] =
! 				bus_alloc_resource(dev, SYS_RES_IOPORT,
! 						&sc->sc_resources.io_rid[2],
! 						0UL, ~0UL, 1, RF_ACTIVE)))
! 		{
! 			printf("isic%d: Could not get cfg io area for Compaq Microcom 610\n", 
unit);
! 			isic_detach_common(dev);
! 			return ENXIO;
! 		}
!
! 		iocfg = rman_get_start(sc->sc_resources.io_base[2]);
!
! 	        bus_release_resource(dev, SYS_RES_IOPORT, 
sc->sc_resources.io_rid[2],
! 				sc->sc_resources.io_base[2]);
! 	}
!
! 	/* remember the io base addresses */

+ 	if (sc->sc_cardtyp != CARD_TYPEP_COMPAQ_M610)
+ 	{
+ 		iobase1 = rman_get_start(sc->sc_resources.io_base[0]);
+ 		iobase2 = rman_get_start(sc->sc_resources.io_base[1]);
+ 	}
+ 	else
+ 	{
+ 		iobase1 = rman_get_start(sc->sc_resources.io_base[1]);
+ 		iobase2 = rman_get_start(sc->sc_resources.io_base[0]);
+ 	}
+
  	/*
  	 * because overlapping resources are invalid,
! 	 * release the first and second io port resource
  	 */

          bus_release_resource(dev, SYS_RES_IOPORT, 
sc->sc_resources.io_rid[0],
  			sc->sc_resources.io_base[0]);

+         bus_release_resource(dev, SYS_RES_IOPORT, 
sc->sc_resources.io_rid[1],
+ 			sc->sc_resources.io_base[1]);
+
  	/* set and allocate a base io address for the ISAC chip */

  	sc->sc_resources.io_rid[2] = 2;

  	bus_set_resource(dev, SYS_RES_IOPORT, 2, iobase1-0x20, 0x40);
!
  	if(!(sc->sc_resources.io_base[2] =
  		bus_alloc_resource(dev, SYS_RES_IOPORT,
  				   &sc->sc_resources.io_rid[2],
***************
*** 160,172 ****
  		return ENXIO;
  	}

- 	/*
- 	 * because overlapping resources are invalid,
- 	 * release the second io port resource
- 	 */
-
-         bus_release_resource(dev, SYS_RES_IOPORT, 
sc->sc_resources.io_rid[1],
- 			sc->sc_resources.io_base[1]);

  	/* set and allocate a resource for the HSCX channel A */

--- 197,202 ----
***************
*** 200,206 ****
  	sc->sc_resources.io_rid[4] = 4;

  	bus_set_resource(dev, SYS_RES_IOPORT, 4, iobase2, 0x40);
!
  	if(!(sc->sc_resources.io_base[4] =
  		bus_alloc_resource(dev,SYS_RES_IOPORT,
  				   &sc->sc_resources.io_rid[4],
--- 230,236 ----
  	sc->sc_resources.io_rid[4] = 4;

  	bus_set_resource(dev, SYS_RES_IOPORT, 4, iobase2, 0x40);
!
  	if(!(sc->sc_resources.io_base[4] =
  		bus_alloc_resource(dev,SYS_RES_IOPORT,
  				   &sc->sc_resources.io_rid[4],
***************
*** 210,216 ****
  		isic_detach_common(dev);
  		return ENXIO;
  	}
!
  	/* setup access routines */

  	sc->clearirq = NULL;
--- 240,268 ----
  		isic_detach_common(dev);
  		return ENXIO;
  	}
!
! 	/*
! 	 * set and allocate a resource for the cfg io
! 	 * for compaq m610
! 	 */
!
! 	if (sc->sc_cardtyp == CARD_TYPEP_COMPAQ_M610)
! 	{
! 		sc->sc_resources.io_rid[5] = 5;
!
! 		bus_set_resource(dev, SYS_RES_IOPORT, 5, iocfg, 0x01);
!
! 		if(!(sc->sc_resources.io_base[5] =
! 			bus_alloc_resource(dev,SYS_RES_IOPORT,
! 					   &sc->sc_resources.io_rid[5],
! 					   0ul, ~0ul, 1, RF_ACTIVE)))
! 		{
! 			printf("isic%d: Could not get cfg io area for Compaq Microcom 610!\n", 
unit);
! 			isic_detach_common(dev);
! 			return ENXIO;
! 		}
! 	}
!
  	/* setup access routines */

  	sc->clearirq = NULL;
***************
*** 221,228 ****
  	sc->writefifo = ctxs0P_write_fifo;

  	/* setup card type */
!
! 	sc->sc_cardtyp = CARD_TYPEP_CS0P;

  	/* setup IOM bus type */

--- 273,281 ----
  	sc->writefifo = ctxs0P_write_fifo;

  	/* setup card type */
!
! 	if (sc->sc_cardtyp != CARD_TYPEP_COMPAQ_M610)
! 		sc->sc_cardtyp = CARD_TYPEP_CS0P;

  	/* setup IOM bus type */

***************
*** 233,249 ****

  	/* enable the card */

! 	t = rman_get_bustag(sc->sc_resources.io_base[2]);
! 	h = rman_get_bushandle(sc->sc_resources.io_base[2]);

! 	bus_space_write_1(t, h, 0x3c, 0);
! 	DELAY(SEC_DELAY / 10);

! 	bus_space_write_1(t, h, 0x3c, 1);
! 	DELAY(SEC_DELAY / 10);

  	return 0;
  }

! #endif /* (NISIC > 0) && (defined(CRTX_S0_P) || defined(TEL_S0_16_3_P)) */

--- 286,316 ----

  	/* enable the card */

! 	if (sc->sc_cardtyp != CARD_TYPEP_COMPAQ_M610)
! 	{
! 		t = rman_get_bustag(sc->sc_resources.io_base[2]);
! 		h = rman_get_bushandle(sc->sc_resources.io_base[2]);

! 		bus_space_write_1(t, h, 0x3c, 0);
! 		DELAY(SEC_DELAY / 10);

! 		bus_space_write_1(t, h, 0x3c, 1);
! 		DELAY(SEC_DELAY / 10);
! 	}
! 	else
! 	{
! 		t = rman_get_bustag(sc->sc_resources.io_base[5]);
! 		h = rman_get_bushandle(sc->sc_resources.io_base[5]);

+ 		bus_space_write_1(t, h, 0xff, 0);
+ 		DELAY(SEC_DELAY / 10);
+
+ 		bus_space_write_1(t, h, 0x00, 1);
+ 		DELAY(SEC_DELAY / 10);
+ 	}
+
  	return 0;
  }

! #endif /* (NISIC > 0) && (defined(CRTX_S0_P) || defined(TEL_S0_16_3_P) || 
defined(COMPAQ_M610)) */

*** /usr/src/sys/i4b/layer1/isic/i4b_isic_pnp.c.orig	Mon Aug 27 16:57:57 
2001
--- /usr/src/sys/i4b/layer1/isic/i4b_isic_pnp.c	Mon Aug 27 16:59:08 2001
***************
*** 71,84 ****
  #define VID_ASUSCOM_IPAC	0x90167506	/* Asuscom (with IPAC)	*/
  #define VID_EICON_DIVA_20	0x7100891c	/* Eicon DIVA 2.0 ISAC/HSCX */
  #define VID_EICON_DIVA_202	0xa100891c      /* Eicon DIVA 2.02 IPAC	*/

  static struct isic_pnp_ids {
  	u_long vend_id;
  	char *id_str;
  } isic_pnp_ids[] = {
! #if defined(TEL_S0_16_3_P) || defined(CRTX_S0_P)
  	{ VID_TEL163PNP,	"Teles S0/16.3 PnP"		},
  	{ VID_CREATIXPP,	"Creatix S0/16 PnP"		},
  #endif
  #ifdef DYNALINK
  	{ VID_DYNALINK,		"Dynalink IS64PH"		},
--- 71,86 ----
  #define VID_ASUSCOM_IPAC	0x90167506	/* Asuscom (with IPAC)	*/
  #define VID_EICON_DIVA_20	0x7100891c	/* Eicon DIVA 2.0 ISAC/HSCX */
  #define VID_EICON_DIVA_202	0xa100891c      /* Eicon DIVA 2.02 IPAC	*/
+ #define VID_COMPAQ_M610		0x0210110e	/* Compaq Microcom 610	*/

  static struct isic_pnp_ids {
  	u_long vend_id;
  	char *id_str;
  } isic_pnp_ids[] = {
! #if defined(TEL_S0_16_3_P) || defined(CRTX_S0_P) || defined(COMPAQ_M610)
  	{ VID_TEL163PNP,	"Teles S0/16.3 PnP"		},
  	{ VID_CREATIXPP,	"Creatix S0/16 PnP"		},
+ 	{ VID_COMPAQ_M610,	"Compaq Microcom 610"		},
  #endif
  #ifdef DYNALINK
  	{ VID_DYNALINK,		"Dynalink IS64PH"		},
***************
*** 223,229 ****

  	switch(vend_id)
  	{
! #if defined(TEL_S0_16_3_P) || defined(CRTX_S0_P)
  		case VID_TEL163PNP:
  			sc->sc_cardtyp = CARD_TYPEP_163P;
  			ret = isic_attach_Cs0P(dev);
--- 225,231 ----

  	switch(vend_id)
  	{
! #if defined(TEL_S0_16_3_P) || defined(CRTX_S0_P) || defined(COMPAQ_M610)
  		case VID_TEL163PNP:
  			sc->sc_cardtyp = CARD_TYPEP_163P;
  			ret = isic_attach_Cs0P(dev);
***************
*** 231,236 ****
--- 233,243 ----

  		case VID_CREATIXPP:
  			sc->sc_cardtyp = CARD_TYPEP_CS0P;
+ 			ret = isic_attach_Cs0P(dev);
+ 			break;
+
+ 		case VID_COMPAQ_M610:
+ 			sc->sc_cardtyp = CARD_TYPEP_COMPAQ_M610;
  			ret = isic_attach_Cs0P(dev);
  			break;
  #endif
*** /usr/src/sys/i386/include/i4b_ioctl.h.orig	Mon Aug 27 16:58:21 2001
--- /usr/src/sys/i386/include/i4b_ioctl.h	Mon Aug 27 16:58:48 2001
***************
*** 136,141 ****
--- 136,142 ----
  #define CARD_TYPEP_CCD_HFCS_PCI	28	/* Cologne Chip HFC-S PCI based	*/
  #define	CARD_TYPEP_NETJET_S	29	/* Traverse NetJet-S (Tiger300) */
  #define	CARD_TYPEP_DIVA_ISA	30	/* Eicon DIVA ISA PnP 2.0 or 2.02 */
+ #define CARD_TYPEP_COMPAQ_M610	31	/* Compaq Microcom 610		*/

  /*
   * in case you add support for more cards, please update:
***************
*** 145,151 ****
   * and adjust CARD_TYPEP_MAX below.
   */

! #define CARD_TYPEP_MAX		30	/* max type */

  
/*---------------------------------------------------------------------------*
   *	card types for CTRL_DAIC
--- 146,152 ----
   * and adjust CARD_TYPEP_MAX below.
   */

! #define CARD_TYPEP_MAX		31	/* max type */

  
/*---------------------------------------------------------------------------*
   *	card types for CTRL_DAIC
*** /usr/src/usr.sbin/i4b/isdnd/controller.c.orig	Mon Aug 27 16:58:30 2001
--- /usr/src/usr.sbin/i4b/isdnd/controller.c	Mon Aug 27 16:58:34 2001
***************
*** 78,83 ****
--- 78,84 ----
  		"Cologne Chip HFC-S PCI based",
  		"Traverse Tech NETjet-S / Teles PCI-TJ",
  		"Eicon.Diehl DIVA 2.0 / 2.02 ISA PnP",
+ 		"Compaq Microcom 610",
  	};

  	static char *daic_card[] = {


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


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?F135EcsbUelMSGriY76000131fd>