Subject: kern/5120: if_ne_pcmcia mod, add support for Dayna CommuniCard E
To: None <gnats-bugs@gnats.netbsd.org>
From: None <Havard.Eidnes@runit.sintef.no>
List: netbsd-bugs
Date: 03/06/1998 14:02:46
>Number:         5120
>Category:       kern
>Synopsis:       if_ne_pcmcia mod, add support for Dayna CommuniCard E
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Mar  6 09:20:00 1998
>Last-Modified:
>Originator:     Havard Eidnes
>Organization:
	RUNIT AS
>Release:        NetBSD 1.3
>Environment:
System: NetBSD snylteveps.runit.sintef.no 1.3 NetBSD 1.3 (XPI_APM) #3: Thu Mar 5 18:42:41 MET 1998 root@snylteveps.runit.sintef.no:/usr/src/sys/arch/i386/compile/XPI_APM i386


>Description:
	I recently "had" to borrow a Dayna CommuniCard E pcmcia ethernet
	card (forgot the cable to my 3Com card back home...), and I found
	parts of the support in if_ne_pcmcia.c, but commented out because
	the vendor code, product ID and CIS strings were unknown to the
	driver author.  I now have this information, and supply below a
	modification which worked for me.  Note that I've not removed the
	entry from the #if 0 / #endif block.

	With my changes, my kernel prints the following for this card
	on startup:

pcmcia1: CIS version 2.0 or 2.01
pcmcia1: CIS info: Dayna Communications, Inc., CommuniCard E, 
pcmcia1: Manufacturer code 0x194, product 0x2d
pcmcia1: function 0: network adapter, ccr addr 100 mask 1
pcmcia1: function 0, config table entry 1: I/O card; irq mask ffff; iomask 5, iospace 0-1f; mwait_required rdybsy_active wp_active bvd_active io16 irqpulse irqlevel
ne0 at pcmcia1 function 0 port 0x340-0x34f port 0x350-0x35f
ne0: Dayna CommuniCard E Ethernet
ne0: Ethernet address 00:80:19:31:5b:67

	and it worked on the first try.

	My utmost thanks to the one who had the sense to include the
	code within the #if 0 / #endif making it dead easy to make
	this modification.

>How-To-Repeat:
	Pop in a Dayna CommuniCard E in your pc, notice that it says
	"not configured".  Rummage through if_ne_pcmcia.c, and notice
	the reason for its non-support.

>Fix:

--- /sys/dev/pcmcia/if_ne_pcmcia.c.dist	Fri Dec 19 13:29:13 1997
+++ /sys/dev/pcmcia/if_ne_pcmcia.c	Thu Mar  5 18:42:25 1998
@@ -112,8 +112,12 @@
     { "D-Link DE-650",
       PCMCIA_MANUFACTURER_INVALID, PCMCIA_PRODUCT_INVALID,
       "D-Link", "DE-650", 0,
       0x0040, { 0x00, 0x80, 0xc8 } },
+    { "Dayna CommuniCard E",
+      0x0194, 0x002d,
+      "Dayna", "CommuniCard E", 0,
+      0x0110, { 0x00, 0x80, 0x19 } },
 #if 0
     /* the rest of these are stolen from the linux pcnet pcmcia device
        driver.  Since I don't know the manfid or cis info strings for
        any of them, they're not compiled in until I do. */
>Audit-Trail:
>Unformatted: