Subject: port-mac68k/6199: adding support for TFL LAN Inc cards to if_ae_nubus.c
To: None <gnats-bugs@gnats.netbsd.org>
From: Colonel Hacker <hacker@synap.ne.jp>
List: netbsd-bugs
Date: 09/26/1998 12:50:33
>Number:         6199
>Category:       port-mac68k
>Synopsis:       Add support for TFL LAN Inc. cards to if_ae_nubus.c
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Sep 25 21:05:01 1998
>Last-Modified:
>Originator:     Colonel Hacker (aka Ken Nakata)
>Organization:
>Release:        Sep 19, 1998
>Environment:
	Mac 68k (anything else doesn't matter)
System: NetBSD quark.nakata.com 1.3F NetBSD 1.3F (QUARK) #3: Wed Jul 22 11:30:13 JST 1998 hacker@quark.nakata.com:/s/src/sys/arch/mac68k/compile/QUARK mac68k


>Description:

	Support added for TFL LAN Inc. E410 NuBus/E420 LC PDS cards to
if_ae_nubus.c

Excerpt from dmesg:
| nubus slot e:EtheNet Card(Vender:TFL LAN INC.,Part:E410 NuBus/E420 LC
| PDS,EtheNet Adapter)Type:0004 0001 011e 0100 not configured

>How-To-Repeat:
	
>Fix:
	Diffs attached.  This fix is based on the patch posted by
"Haru Maruyama" <h-maru@da2.so-net.ne.jp> on the newsgroups
fj.os.bsd.netbsd.  Cleaned up by me.

*** nubus.h.orig	Wed Sep 16 20:11:25 1998
--- nubus.h	Sun Sep 20 10:17:48 1998
***************
*** 93,98 ****
--- 93,99 ----
  #define   NUBUS_DRSW_FARALLON	0x010C
  #define   NUBUS_DRSW_DAYNA2	0x0115
  #define   NUBUS_DRSW_FOCUS	0x011A
+ #define   NUBUS_DRSW_TFLLAN	0x011E
  #define    NUBUS_DRHW_INTERLAN	0x0100
  #define    NUBUS_DRHW_KINETICS	0x0106
  #define    NUBUS_DRHW_CABLETRON	0x0109
*** if_ae_nubus.c.orig	Wed Aug 12 20:10:01 1998
--- if_ae_nubus.c	Sat Sep 26 12:49:39 1998
***************
*** 420,425 ****
--- 420,426 ----
  	case NUBUS_DRSW_APPLE:
  	case NUBUS_DRSW_DAYNA2:
  	case NUBUS_DRSW_TECHWORKS:
+ 	case NUBUS_DRSW_TFLLAN:
  		if (na->drhw == NUBUS_DRHW_CABLETRON) {
  			vendor = DP8390_VENDOR_CABLETRON;
  		} else {
***************
*** 472,478 ****
  	 * we find out more about Ethernet card resources.
  	 */
  	nubus_get_main_dir(na->fmt, &dir);
! 	if (nubus_find_rsrc(bst, bsh, na->fmt, &dir, 0x80, &dirent) <= 0)
  		return 1;
  	nubus_get_dir_from_rsrc(na->fmt, &dirent, &dir);
  	if (nubus_find_rsrc(bst, bsh, na->fmt, &dir, 0x80, &dirent) <= 0)
--- 473,482 ----
  	 * we find out more about Ethernet card resources.
  	 */
  	nubus_get_main_dir(na->fmt, &dir);
! 	if (nubus_find_rsrc(bst, bsh, na->fmt, &dir, 0x80, &dirent) <= 0 &&
! 	    /* XXX TFL LAN Inc.'s E410 & E420 reportedly use sRsrc ID 0x08
! 	     * to store hw addr */
! 	    nubus_find_rsrc(bst, bsh, na->fmt, &dir, 0x08, &dirent) <= 0)
  		return 1;
  	nubus_get_dir_from_rsrc(na->fmt, &dirent, &dir);
  	if (nubus_find_rsrc(bst, bsh, na->fmt, &dir, 0x80, &dirent) <= 0)
>Audit-Trail:
>Unformatted: