Subject: kern/12188: ambicom 8110 pcmcia ethernet support
To: None <gnats-bugs@gnats.netbsd.org>
From: Jesse Off <joff@netbsd.org>
List: netbsd-bugs
Date: 02/12/2001 00:15:19
>Number:         12188
>Category:       kern
>Synopsis:       ambicom 8110 pcmcia ethernet support
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 12 00:18:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        -current as of today
>Organization:
	
>Environment:
NetBSD/i386, Micron GoBook Pentium MMX 233


>Description:
	Enclosed is a patch that allows me to use a Ambicom 8110
	ethernet card.  Since ethernet drivers and pcmcia are not
	my area of expertise, I'd like somebody to take a look at
	this and either 1) say its ok so I can commit it, or 2)
	tell me its wrong and how I should have done it to make it
	correct.

	The only thing I'm not really sure of is ignoring error on
	the AX88190 set_iobase() func.  This doesn't do a thing
	for the Ambicom card, and only causes the match to unnecesarily
	fail.  Reading the iobase returns 0x300 even if the card
	responds at 0x2300.  Writing it does nothing.  
>How-To-Repeat:
>Fix:
Index: if_ne_pcmcia.c
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/pcmcia/if_ne_pcmcia.c,v retrieving
revision 1.67 diff -u -r1.67 if_ne_pcmcia.c --- if_ne_pcmcia.c
2001/01/18 20:28:26     1.67 +++ if_ne_pcmcia.c      2001/02/12
07:43:32 @@ -99,6 +99,11 @@
 #define        NE2000DVF_DL10019       0x0001          /* chip is
 D-Link DL10019 */ #define        NE2000DVF_AX88190       0x0002
 /* chip is ASIX AX88190 */ } ne2000devs[] = { +    {
PCMCIA_STR_AMBICOM_AMB8110, +      PCMCIA_VENDOR_INVALID,
PCMCIA_PRODUCT_INVALID, +      PCMCIA_CIS_AMBICOM_AMB8110, +
0, -1, { 0x00, 0x10, 0x7a }, NE2000DVF_AX88190 }, +
     { PCMCIA_STR_AMBICOM_AMB8002T,
       PCMCIA_VENDOR_INVALID, PCMCIA_PRODUCT_INVALID,
       PCMCIA_CIS_AMBICOM_AMB8002T, @@ -884,9 +889,7 @@
 #ifdef DIAGNOSTIC
	printf(" 0x%x\n", new_liobase); #endif -       if ((last_liobase
== psc->sc_pcioh.addr) -           || (last_liobase != new_liobase))
-               rv = 0; +       rv = 0;
 
 	pcmcia_mem_unmap(psc->sc_pf, mwindow);
  fail_2:
Index: pcmciadevs
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/pcmcia/pcmciadevs,v
retrieving revision 1.119
diff -u -r1.119 pcmciadevs
--- pcmciadevs	2001/02/11 03:27:49	1.119
+++ pcmciadevs	2001/02/12 07:43:41
@@ -326,6 +326,7 @@
 product SVEC PN650TX		-1 SVEC PN650TX 10/100 Dual Speed Fast Ethernet PC Card
 product NAKAGAWAMETAL LNT10TN	{ "PCMCIA", "LNT-10TN", NULL, NULL } NAKAGAWA METAL LNT-10TN NE2000 Compatible Card 
 product AMBICOM AMB8002T	{ "AmbiCom&spInc", "AMB8002T", NULL, NULL } AmbiCom AMB8002T
+product AMBICOM AMB8110		{ "AmbiCom,Inc.", "Fast&spEthernet&spPC&spCard(AMB8110)", NULL, NULL } AmbiCom AMB8110
 product IODATA PCLAT		{ "I-O&spDATA", "PCLA", "ETHERNET", NULL } IO-DATA PCLA/T
 product IODATA CBIDE2		{ "IO&spDATA", "CBIDE2&sp&sp&sp&sp&sp&sp", NULL, NULL } IO-DATA CBIDE2/16-bit mode
 product EPSON EEN10B		{ "Seiko&spEpson&spCorp.", "Ethernet", "P/N:&spEEN10B&spRev.&sp00", NULL } Epson EEN10B
Index: pcmciadevs.h
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/pcmcia/pcmciadevs.h,v
retrieving revision 1.118
diff -u -r1.118 pcmciadevs.h
--- pcmciadevs.h	2001/02/11 03:28:16	1.118
+++ pcmciadevs.h	2001/02/12 07:43:45
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcmciadevs.h,v 1.118 2001/02/11 03:28:16 ichiro Exp $	*/
+/*	$NetBSD$	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcmciadevs,v 1.118 2001/02/10 14:08:10 ichiro Exp 
+ *	NetBSD: pcmciadevs,v 1.119 2001/02/11 03:27:49 ichiro Exp 
  */
 /*$FreeBSD: src/sys/dev/pccard/pccarddevs,v 1.8 2001/01/20 01:48:55 imp Exp $*/
 
@@ -573,6 +573,9 @@
 #define	PCMCIA_CIS_AMBICOM_AMB8002T	{ "AmbiCom Inc", "AMB8002T", NULL, NULL }
 #define	PCMCIA_PRODUCT_AMBICOM_AMB8002T	-1
 #define	PCMCIA_STR_AMBICOM_AMB8002T	"AmbiCom AMB8002T"
+#define	PCMCIA_CIS_AMBICOM_AMB8110	{ "AmbiCom,Inc.", "Fast Ethernet PC Card(AMB8110)", NULL, NULL }
+#define	PCMCIA_PRODUCT_AMBICOM_AMB8110	-1
+#define	PCMCIA_STR_AMBICOM_AMB8110	"AmbiCom AMB8110"
 #define	PCMCIA_CIS_IODATA_PCLAT	{ "I-O DATA", "PCLA", "ETHERNET", NULL }
 #define	PCMCIA_PRODUCT_IODATA_PCLAT	-1
 #define	PCMCIA_STR_IODATA_PCLAT	"IO-DATA PCLA/T"
Index: pcmciadevs_data.h
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/pcmcia/pcmciadevs_data.h,v
retrieving revision 1.118
diff -u -r1.118 pcmciadevs_data.h
--- pcmciadevs_data.h	2001/02/11 03:28:16	1.118
+++ pcmciadevs_data.h	2001/02/12 07:43:49
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcmciadevs_data.h,v 1.118 2001/02/11 03:28:16 ichiro Exp $	*/
+/*	$NetBSD$	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcmciadevs,v 1.118 2001/02/10 14:08:10 ichiro Exp 
+ *	NetBSD: pcmciadevs,v 1.119 2001/02/11 03:27:49 ichiro Exp 
  */
 /*$FreeBSD: src/sys/dev/pccard/pccarddevs,v 1.8 2001/01/20 01:48:55 imp Exp $*/
 
@@ -884,6 +884,13 @@
 	    0,
 	    "AmbiCom Inc",
 	    "AmbiCom AMB8002T"	},
+	},
+	{
+	    PCMCIA_VENDOR_UNKNOWN, PCMCIA_PRODUCT_AMBICOM_AMB8110,
+	    PCMCIA_CIS_AMBICOM_AMB8110,
+	    0,
+	    "AmbiCom Inc",
+	    "AmbiCom AMB8110"	},
 	},
 	{
 	    PCMCIA_VENDOR_UNKNOWN, PCMCIA_PRODUCT_IODATA_PCLAT,
>Release-Note:
>Audit-Trail:
>Unformatted: