From chi@bd.mbn.or.jp  Mon Jan  5 01:36:08 1998
Received: from bd.mbn.or.jp (bd.mbn.or.jp [202.217.0.43])
          by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id BAA18642
          for <FreeBSD-gnats-submit@freebsd.org>; Mon, 5 Jan 1998 01:36:07 -0800 (PST)
          (envelope-from chi@bd.mbn.or.jp)
Received: from chino.localhost by bd.mbn.or.jp (8.8.8+2.7Wbeta7/bd.mbn.or.jp-1.1u) with ESMTP id SAA20614
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 5 Jan 1998 18:36:02 +0900 (JST)
Received: (from chi@localhost) by chino.localhost (8.8.5/3.5Wpl7) id LAA00356; Sat, 3 Jan 1998 11:49:50 +0900 (JST)
Message-Id: <199801050936.SAA20614@bd.mbn.or.jp>
Date: Sat, 3 Jan 1998 11:49:50 +0900 (JST)
From: chi@bd.mbn.or.jp
Reply-To: chi@bd.mbn.or.jp, turutani@scphys.kyoto-u.ac.jp
To: FreeBSD-gnats-submit@freebsd.org
Subject: Old Gateway Communications LAN board is not probed
X-Send-Pr-Version: 3.2

>Number:         5435
>Category:       kern
>Synopsis:       [PATCH] if_fe.c for old Gateway Communications LAN board
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan  8 14:30:20 PST 1998
>Closed-Date:    Fri Oct 8 19:43:01 PDT 1999
>Last-Modified:  Fri Oct  8 19:45:37 PDT 1999
>Originator:     Chiharu Shibata
>Release:        FreeBSD 2.2.1-RELEASE i386 or later
>Organization:
Japan FreeBSD Users Group
>Environment:

	G/Ethernet 16 Combo(ISA-LAN) by Gateway Communications,Inc.

>Description:

	fe driver does not probe G/Ethernet 16 Combo, which has
	FUJITSU MB86960A chip on the board.

	Hardware specification is as follows.
	IRQ : 3,4,5,6,7,10,11,12,15,2/9
	I/O Address : 220-23F, 260-27F, 280-29F, 2A0-2BF, 2C0-2DF,
	              2E0-2FF, 300-31F, 320-33F, 340-35F, 360-37F,
	              380-39F, 3A0-3BF, 3C0-3DF, 3E0-3FF

>How-To-Repeat:

	Just set the G/Ethernet 16 Combo, and boot.

>Fix:
	
	The SRAM size is obscure. But 16KB specified by original
	source causes errors "fe0:emptying receive buffer" and
	"fe0:received a big packet?(XXXXX bytes)".

	The following patch(based on 2.2.1-Release) specifies 8KB
	for the safety, it seems to work well.

--- /sys/i386/isa/if_fe.c-	Fri Oct 31 23:21:13 1997
+++ /sys/i386/isa/if_fe.c	Sun Dec 14 21:36:18 1997
@@ -449,11 +449,15 @@
 	{ 0x220, 0x240, 0x260, 0x280, 0x2A0, 0x2C0, 0x300, 0x340, 0 };
 static u_short const fe_ati_addr [] =
 	{ 0x240, 0x260, 0x280, 0x2A0, 0x300, 0x320, 0x340, 0x380, 0 };
+static u_short const fe_gwy_addr [] =
+	{ 0x220, 0x260, 0x280, 0x2A0, 0x2C0, 0x2E0, 0x300, 0x320,
+	  0x340, 0x360, 0x380, 0x3A0, 0x3C0, 0x3E0, 0 };
 
 static struct fe_probe_list const fe_probe_list [] =
 {
 	{ fe_probe_fmv, fe_fmv_addr },
 	{ fe_probe_ati, fe_ati_addr },
+	{ fe_probe_gwy, fe_gwy_addr },
 #if NCRD > 0
 	{ fe_probe_mbh, NULL },  /* PCMCIAs cannot be auto-detected.  */
 	{ fe_probe_tdk, NULL },
@@ -1168,11 +1172,10 @@
 	};
 
 	/*
-	 * We need explicit IRQ and supported address.
-	 * I'm not sure which address and IRQ is possible for Gateway
-	 * Ethernet family.  The following accepts everything.  FIXME.
+	 * Gateway Ethernet family accepts almost IRQs.
+	 * So, only check whether irq is "NO_IRQ".
 	 */
-	if ( dev->id_irq == NO_IRQ || ( sc->iobase & ~0x3E0 ) != 0 ) {
+	if ( dev->id_irq == NO_IRQ ) {
 		return ( 0 );
 	}
 
@@ -1198,15 +1201,18 @@
 
 	/*
 	 * Program the 86960 as follows:
-	 *	SRAM: 16KB, 100ns, byte-wide access.
+	 *	SRAM: 8KB, 100ns, byte-wide access.
 	 *	Transmission buffer: 2KB x 2.
 	 *	System bus interface: 16 bits.
 	 * Make sure to clear out ID bits in DLCR7
 	 * (They actually are Encoder/Decoder control in NICE.)
+	 *
+	 * XXX: I don't know SRAM size, but only 8KB is worked.
+	 *      Could someone tell me "REAL" SRAM size?  FIXME.
 	 */
 	sc->proto_dlcr4 = FE_D4_LBC_DISABLE | FE_D4_CNTRL;
 	sc->proto_dlcr5 = 0;
-	sc->proto_dlcr6 = FE_D6_BUFSIZ_16KB | FE_D6_TXBSIZ_2x2KB
+	sc->proto_dlcr6 = FE_D6_BUFSIZ_8KB | FE_D6_TXBSIZ_2x2KB
 		| FE_D6_BBW_BYTE | FE_D6_SBW_WORD | FE_D6_SRAM_100ns;
 	sc->proto_dlcr7 = FE_D7_BYTSWP_LH;
 	sc->proto_bmpr13 = 0;
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->suspended 
State-Changed-By: phk 
State-Changed-When: Thu Apr 30 22:38:41 PDT 1998 
State-Changed-Why:  
waiting for a committer 

From: chi@bd.mbn.or.jp (Chiharu Shibata)
To: FreeBSD-gnats-submit@FreeBSD.ORG
Cc:  
Subject: Re: kern/5435: request: remove this PR
Date: Sat, 9 Oct 1999 11:12:26 +0900 (JST)

 This is Chiharu Shibata, who sent this PR the other day.
 
 I'll request to cancel this PR.
 Because i386/if_fe.c committed as rev1.45 includes this.
 
 >Category:       kern
 >Responsible:    freebsd-bugs
 >Synopsis:       not probed old Gateway Communications LAN board
 >Arrival-Date:   Thu Jan  8 14:30:20 PST 1998
 -- 
 Chiharu Shibata    chi@bd.mbn.or.jp    <http://plaza17.mbn.or.jp/~chi/>
                                                     Powered by FreeBSD.
 
State-Changed-From-To: suspended->closed 
State-Changed-By: chris 
State-Changed-When: Fri Oct 8 19:43:01 PDT 1999 
State-Changed-Why:  
This was fixed in revision 1.45 of sys/i386/isa/if_fe.c 
>Unformatted:
