From nobody  Thu Jan 30 11:06:04 1997
Received: (from nobody@localhost)
          by freefall.freebsd.org (8.8.5/8.8.5) id LAA25239;
          Thu, 30 Jan 1997 11:06:04 -0800 (PST)
Message-Id: <199701301906.LAA25239@freefall.freebsd.org>
Date: Thu, 30 Jan 1997 11:06:04 -0800 (PST)
From: jeffe@ichips.intel.com
To: freebsd-gnats-submit@freebsd.org
Subject: Patch to support Cogent EM110 fast-ethernet card.
X-Send-Pr-Version: www-1.0

>Number:         2621
>Category:       kern
>Synopsis:       Patch to support Cogent EM110 fast-ethernet card.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 30 11:10:00 PST 1997
>Closed-Date:    Sun Apr 19 02:21:24 PDT 1998
>Last-Modified:  Sun Apr 19 02:24:51 PDT 1998
>Originator:     Jeff Eaton
>Release:        2.2-BETA
>Organization:
Intel Corporation
>Environment:
FreeBSD netm-test.jf.intel.com 2.2-BETA_A FreeBSD 2.2-BETA_A #2: Tue Jan 21 14:07:05 PST 1997     root@netm-test.jf.intel.com:/usr/src/sys/compile/NETM  i386

>Description:
I submitted this patch to the hackers list, and was told it was a better
idea to submit a bug report, even though this is new functionality, and
not really a bug.

The provided patch will allow the Cogent EM110 to work.  All it does
is check for the ID number, and then uses the existing EM100 code.
This works for 2.1.5-RELEASE, 2.1.6-RELEASE, and 2.2-BETA.
>How-To-Repeat:
Boot with an EM110.
>Fix:
patch in /usr/src/sys/pci.  It would not surprise me if tabs got
turned into spaces when I cut and pasted this.

*** dc21040.h.bak       Tue Dec  3 02:52:45 1996
--- dc21040.h   Tue Jan 21 13:17:56 1997
***************
*** 294,299 ****
--- 294,300 ----
  #define       TULIP_OUI_COGENT_1              0x00
  #define       TULIP_OUI_COGENT_2              0x92
  #define       TULIP_COGENT_EM100_ID           0x12
+ #define       TULIP_COGENT_EM110_ID           0x14
  
  
  /*
*** if_de.c.bak Tue Jan 21 13:30:49 1997
--- if_de.c     Tue Jan 21 13:20:28 1997
***************
*** 1593,1598 ****
--- 1593,1607 ----
      tulip_21140_cogent_em100_media_select,
      tulip_21140_nomii_100only_media_preset
  };
+ 
+ /* The cogent 110 acts just like the em100, but the ID is different */
+ static const tulip_boardsw_t tulip_21140_cogent_em110_boardsw = {
+     TULIP_21140_COGENT_EM100,
+     "Cogent EM110 ",
+     tulip_21140_cogent_em100_media_probe,
+     tulip_21140_cogent_em100_media_select,
+     tulip_21140_nomii_100only_media_preset
+ };
  ^L
  
  static int
***************
*** 3255,3260 ****
--- 3264,3271 ----
        if (sc->tulip_chipid == TULIP_21140 || sc->tulip_chipid == TULIP_21140A) {
            if (sc->tulip_rombuf[32] == TULIP_COGENT_EM100_ID)
                sc->tulip_boardsw = &tulip_21140_cogent_em100_boardsw;
+           if (sc->tulip_rombuf[32] == TULIP_COGENT_EM110_ID)
+               sc->tulip_boardsw = &tulip_21140_cogent_em110_boardsw;
        }
      } else if (sc->tulip_hwaddr[0] == TULIP_OUI_ZNYX_0
            && sc->tulip_hwaddr[1] == TULIP_OUI_ZNYX_1

>Release-Note:
>Audit-Trail:

From: Kevin Hendrix <kevin@rocksolid.net>
To: "'freebsd-gnats-submit@freebsd.org'"
	 <freebsd-gnats-submit@freebsd.org>
Cc: "'jeffe@ichips.intel.com'" <jeffe@ichips.intel.com>
Subject: Re: kern/2621: Patch to support Cogent EM110 fast-ethernet card.
Date: Wed, 14 May 1997 09:56:56 -0500

 	I tried Jeff's patch on a system using the Adaptec
 ANA-6911 (formerly known as the Cogent EM110) under
 FreeBSD 2.2.1 and met with no success.  Apparently Adaptec
 changed the ID number of the card when they took over, so
 it didn't match either of the known Cogent ID constants.
 	I've expanded on Jeff's patch to include support for
 the Adaptec card.  Once again, all it does is check for the
 appropriate ID and use the existing EM100 code.  It is known
 to work on 2.2.1-RELEASE.
 
 patch /usr/src/sys/pci.
 
 *** dc21040.h.bak	Wed May 14 05:57:44 1997
 --- dc21040.h	Wed May 14 05:34:29 1997
 ***************
 *** 294,299 ****
 --- 294,301 ----
   #define	TULIP_OUI_COGENT_1		0x00
   #define	TULIP_OUI_COGENT_2		0x92
   #define	TULIP_COGENT_EM100_ID		0x12
 + #define TULIP_COGENT_EM110_ID		0x14
 + #define TULIP_ADAPTEC_ANA6911_ID	0x00
   
   
   /*
 *** if_de.c.bak	Wed May 14 05:57:49 1997
 --- if_de.c	Wed May 14 05:37:39 1997
 ***************
 *** 1603,1608 ****
 --- 1603,1625 ----
       tulip_21140_cogent_em100_media_select,
       tulip_21140_nomii_100only_media_preset
   };
 + /* The cogent 110 acts just like the em100, but the ID is different */
 + static const tulip_boardsw_t tulip_21140_cogent_em110_boardsw = {
 +     TULIP_21140_COGENT_EM100,
 +     "Cogent EM110 ",
 +     tulip_21140_cogent_em100_media_probe,
 +     tulip_21140_cogent_em100_media_select,
 +     tulip_21140_nomii_100only_media_preset
 + };
 + /* The adaptec 6911 acts just like the em100 and em110, but the ID is different */
 + static const tulip_boardsw_t tulip_21140_adaptec_ana6911_boardsw = {
 +     TULIP_21140_COGENT_EM100,
 +     "Adaptec ANA-6911 ",
 +     tulip_21140_cogent_em100_media_probe,
 +     tulip_21140_cogent_em100_media_select,
 +     tulip_21140_nomii_100only_media_preset
 + };
 +     
   
 
   
   static int
 ***************
 *** 3269,3274 ****
 --- 3286,3295 ----
   	if (sc->tulip_chipid == TULIP_21140 || sc->tulip_chipid == TULIP_21140A) {
   	    if (sc->tulip_rombuf[32] == TULIP_COGENT_EM100_ID)
   		sc->tulip_boardsw = &tulip_21140_cogent_em100_boardsw;
 +             if (sc->tulip_rombuf[32] == TULIP_COGENT_EM110_ID)
 +                 sc->tulip_boardsw = &tulip_21140_cogent_em110_boardsw;
 +             if (sc->tulip_rombuf[32] == TULIP_ADAPTEC_ANA6911_ID)
 + 		sc->tulip_boardsw = &tulip_21140_adaptec_ana6911_boardsw;
   	}
       } else if (sc->tulip_hwaddr[0] == TULIP_OUI_ZNYX_0
   	    && sc->tulip_hwaddr[1] == TULIP_OUI_ZNYX_1
 
State-Changed-From-To: open->closed 
State-Changed-By: phk 
State-Changed-When: Sun Apr 19 02:21:24 PDT 1998 
State-Changed-Why:  
timed out 
if_de changes should be sent to Matt Thomas anyway 
>Unformatted:
