Subject: Re: kern/6382: D-Link DE650 probe fails with "enet addr has incorrect vendor code"
To: None <gson@araneus.fi>
From: ITOH Yasufumi <yasufu-i@is.aist-nara.ac.jp>
List: netbsd-bugs
Date: 11/01/1998 00:33:20
In article <199810310900.LAA03824@guava.araneus.fi>
gson@araneus.fi writes:

(D-Link DE-650 won't work)

> >Fix:
> 
> Apply the following patch.

Things are slightly more complicated.
Say, we have four versions of D-Link DE-650's.
(1 is the oldest)

1.
CIS info: D-Link, DE-650
Manufacturer code 0xffffffff, product 0xffffffff
Ethernet address 00:80:c8:80:*:*
Note:	White card and white coupler.  The coupler has 10BT connector only.

2.
CIS info: D-Link, DE-650, Ver 01.00
Manufacturer code 0xffffffff, product 0xffffffff
Ethernet address 00:80:c8:81:*:*
Note:	Major change in appearance.  Bare metal card and black coupler.
	Both 10B2 and 10BT connectors are integrated on one coupler.
	White arrows on the connector of the coupler.

3.
CIS info: D-Link, DE-650, Ver 01.00
Manufacturer code 0x149, product 0x265
Ethernet address 00:80:c8:82:*:*
Note:	The while arrows on the connector disappeared.
	Other minor changes in appearance.

4.
CIS info: D-Link, DE-650, Ver 01.00
Manufacturer code 0x149, product 0x265
Ethernet address 00:80:c8:84:*:*
Note:	The coupler became larger and collision indicator is added on it.


While the types 1 and 2 should use the "D-Link DE-650" entry,
the types 3 and 4 should use the "Linksys EtherCard" entry.

# The driver of Microsoft Windows95 can't handle type 1 and 2. :-(
# Use them on NetBSD. :-)

I think your card corresponds to the type 4 (or newer version) from
the ether address.

The following patch makes the ne driver get along with the
above all four types of "DE-650"s.

Any comments/corrections/improvements?
--
ITOH, Yasufumi <yasufu-i@is.aist-nara.ac.jp>, <itohy@netbsd.org>


diff -u if_ne_pcmcia.c.orig if_ne_pcmcia.c
--- if_ne_pcmcia.c.orig	Wed Oct 28 21:12:32 1998
+++ if_ne_pcmcia.c	Sat Oct 31 23:39:41 1998
@@ -98,11 +98,6 @@
       PCMCIA_CIS_PLANET_SMARTCOM2000,
       0, 0xff0, { 0x00, 0x00, 0xe8 } },
 
-    { PCMCIA_STR_DLINK_DE650,
-      PCMCIA_VENDOR_INVALID, PCMCIA_PRODUCT_INVALID,
-      PCMCIA_CIS_DLINK_DE650,
-      0, 0x0040, { 0x00, 0x80, 0xc8 } },
-
     { PCMCIA_STR_DLINK_DE660,
       PCMCIA_VENDOR_INVALID, PCMCIA_PRODUCT_INVALID,
       PCMCIA_CIS_DLINK_DE660,
@@ -119,6 +114,29 @@
       0, 0x0ff0, { 0x00, 0x00, 0xe8 } },
 
     /*
+     * D-Link DE-650 has many minor versions:
+     *
+     *   CIS information          Manufacturer product  Note
+     * 1 "D-Link, DE-650"             INVALID  INVALID  white card
+     * 2 "D-Link, DE-650, Ver 01.00"  INVALID  INVALID  become bear metal
+     * 3 "D-Link, DE-650, Ver 01.00"   0x149    0x265   minor change in look
+     * 4 "D-Link, DE-650, Ver 01.00"   0x149    0x265   collision LED added
+     *
+     * While the 1st and the 2nd types should use the "D-Link DE-650" entry,
+     * the 3rd and the 4th types should use the "Linksys EtherCard" entry.
+     * Therefore, the Linksys entry should be before the D-Link.  --itohy
+     */
+    { PCMCIA_STR_LINKSYS_ECARD_1, 
+      PCMCIA_VENDOR_LINKSYS, PCMCIA_PRODUCT_LINKSYS_ECARD_1,
+      PCMCIA_CIS_LINKSYS_ECARD_1, 
+      0, -1, { 0x00, 0x80, 0xc8 } },
+
+    { PCMCIA_STR_DLINK_DE650,
+      PCMCIA_VENDOR_INVALID, PCMCIA_PRODUCT_INVALID,
+      PCMCIA_CIS_DLINK_DE650,
+      0, 0x0040, { 0x00, 0x80, 0xc8 } },
+
+    /*
      * You have to add new entries which contains
      * PCMCIA_VENDOR_INVALID and/or PCMCIA_PRODUCT_INVALID 
      * in front of this comment.
@@ -133,11 +151,6 @@
       PCMCIA_VENDOR_IBM, PCMCIA_PRODUCT_IBM_INFOMOVER,
       PCMCIA_CIS_IBM_INFOMOVER,
       0, 0x0ff0, { 0x08, 0x00, 0x5a } },
-
-    { PCMCIA_STR_LINKSYS_ECARD_1, 
-      PCMCIA_VENDOR_LINKSYS, PCMCIA_PRODUCT_LINKSYS_ECARD_1,
-      PCMCIA_CIS_LINKSYS_ECARD_1, 
-      0, -1, { 0x00, 0x80, 0xc8 } },
 
     { PCMCIA_STR_LINKSYS_COMBO_ECARD, 
       PCMCIA_VENDOR_LINKSYS, PCMCIA_PRODUCT_LINKSYS_COMBO_ECARD,