Subject: port-i386/17886: I made NETGEAR FA511 cardbus device driver. (But unfortunately it has problems.)
To: None <gnats-bugs@gnats.netbsd.org>
From: None <kirihara@halolsi.com>
List: netbsd-bugs
Date: 08/08/2002 15:52:32
>Number:         17886
>Category:       port-i386
>Synopsis:       I made NETGEAR FA511 cardbus device driver. (But unfortunately it has problems.)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    port-i386-maintainer
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Aug 08 15:53:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     KIRIHARA, Masaharu
>Release:        1.5ZC (upgraded from 1.5.2-release with upgrade of config)
>Organization:
>Environment:
NetBSD kirihara.halolsi 1.5ZC NetBSD 1.5ZC (TPLAP) #0: Thu Aug  8 12:25:52 EDT 2002     root@:/usr/src/sys/arch/i386/compile/TPLAP i386
IBM ThinkPad 570 (2644-3AJ) with 192MB RAM
The kernel is based on GENERIC_LAPTOP with comment out of "options I386_CPU", "options I486_CPU", 
"options I686_CPU", "options MATH_EMULATE" and "apm0 at mainbus0". 
(Otherwise the kernel couldn't be compiled somehow.)

>Description:
Current code (20020802 in releng.netbsd.org) seems not to support 
NETGEAR FA511 cardbus network card yet. 
With a few addition, I made a device driver for it. 
(See below "Fix to the problem if known".) 
It works well except a few problems:

    [1] dmesg after booting with attachment of the card says:

cbb0: bad Vcc request. sock_ctrl 0x30, sock_status 0x30000b20
tlp0 at cardbus0 dev 0 function 0: ADMtek AN985 Ethernet, pass 1.1
tlp0: Ethernet address 00:10:7a:xx:xx:xx
ukphy0 at tlp0 phy 1: Generic IEEE 802.3u media interface
ukphy0: ACXXX 10/100 media interface (OUI 0x0010a9, model 0x0001), rev. 0
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
cbb0: bad Vcc request. sock_ctrl 0x0, sock_status 0x30000b69

        I'm afraid "bad Vcc request" makes troubles. 
        I'm not sure "bad Vcc request" is caused by ThinkPad 570 or FA511. 

    [2] After booting without attachment of the card, 
        when the card is attached, the card doesn't work 
        unless ifconfig is executed. 
        (It may be caused by my incorrect setting or by "bad Vcc request"?)

    [3] During reboot procedure, ThinkPad freeses in both cases 
        of attaching the card and of unattaching the card. 
        (It may be caused by "bad Vcc request"?)

Anyways, if this device driver is included before 1.6-release, 
I'm very happy because a kernel in an install floppy disk 
has the driver and then I can install 1.6-release cleanly 
via network. 
(Present installation done by borrowing my friend's CD-ROM is temporary. 
In my plan it will be deleted completely. 
Don't be surprised even if it is the fact 
that this is the first NetBSD install for me.  :-)

>How-To-Repeat:
Written in "Full Description" above.

>Fix:
tlp device driver can be used for NETGEAR FA511 network card.

*** sys/dev/cardbus/cardbusdevs.h.orig	Mon Feb 18 07:32:54 2002
--- sys/dev/cardbus/cardbusdevs.h	Thu Aug  8 08:20:35 2002
***************
*** 59,64 ****
--- 59,65 ----
  #define	CARDBUS_VENDOR_DLINK	0x1186		/* D-Link Systems */
  #define	CARDBUS_VENDOR_COREGA	0x1259		/* Corega */
  #define	CARDBUS_VENDOR_ALLIEDTELESYN	0x1259		/* Allied Telesyn International */
+ #define	CARDBUS_VENDOR_NETGEAR	0x1317		/* NETGEAR, Inc. */
  #define	CARDBUS_VENDOR_ABOCOM	0x13d1		/* AboCom Systems */
  #define	CARDBUS_VENDOR_HAWKING	0x17b3		/* Hawking Technology */
  #define	CARDBUS_VENDOR_INTEL	0x8086		/* Intel */
***************
*** 114,119 ****
--- 115,123 ----
  
  /* Corega products */
  #define	CARDBUS_PRODUCT_COREGA_CB_TXD	0xa117		/* FEther CB-TXD 10/100 Ethernet */
+ 
+ /* NETGEAR products */
+ #define	CARDBUS_PRODUCT_NETGEAR_FA511	0x1985		/* FA511 10/100 Ethernet */
  
  /* AboCom products */
  #define	CARDBUS_PRODUCT_ABOCOM_FE2500	0xab02		/* FE2500 10/100 Ethernet */

*** sys/dev/cardbus/if_tlp_cardbus.c.orig	Mon Apr 15 08:39:21 2002
--- sys/dev/cardbus/if_tlp_cardbus.c	Thu Aug  8 08:22:43 2002
***************
*** 160,165 ****
--- 160,168 ----
  	{ CARDBUS_VENDOR_HAWKING,	CARDBUS_PRODUCT_HAWKING_PN672TX,
  	  TULIP_CHIP_AN985 },
  
+ 	{ CARDBUS_VENDOR_NETGEAR,	CARDBUS_PRODUCT_NETGEAR_FA511,
+ 	  TULIP_CHIP_AN985 },
+ 
  	{ 0,				0,
  	  TULIP_CHIP_INVALID },
  };

>Release-Note:
>Audit-Trail:
>Unformatted: