Subject: kern/36605: [PATCH] adding IP100A chipset support to if_ste.c
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <palopezv@gmail.com>
List: netbsd-bugs
Date: 07/04/2007 16:40:01
>Number:         36605
>Category:       kern
>Synopsis:       [PATCH] adding IP100A chipset support to if_ste.c
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 04 16:40:00 +0000 2007
>Originator:     Pedro Alejandro López-Valencia
>Release:        netbsd-4
>Organization:
>Environment:
Not applicable
>Description:
IC Plus Corp bought out Sundance Technologies some years back and replaced the ST201 chipset with the IP100A while keeping the vendor PCI id 0x13f0 and changing the PCI id from 0x0201 to 0x0200. The latter chipset is used in several inexpensive network cards made by D-Link, Encore, Advantek and others, as well as integrated network interfaces in mid- and high-end motherboards makde by ASUS, ABIT and other manufacturers.

The included patch adds support for network cards that use the IC Plus Corp IP100A chipset.

References:

http://www.icplus.com.tw/product.htm
http://www.icplus.com.tw/pp-IP100A.html
http://www.icplus.com.tw/driver-pp-IP100A.html
>How-To-Repeat:
Use hardware with the IP100A chipset. No hardware detected at all.

>Fix:
Index: ./sys/dev/pci/if_ste.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/if_ste.c,v
retrieving revision 1.25.2.1
diff -c -3 -r1.25.2.1 if_ste.c
*** ./sys/dev/pci/if_ste.c	1 Apr 2007 16:08:04 -0000	1.25.2.1
--- ./sys/dev/pci/if_ste.c	4 Jul 2007 15:11:13 -0000
***************
*** 266,271 ****
--- 266,274 ----
  	pci_product_id_t	ste_product;
  	const char		*ste_name;
  } ste_products[] = {
+ 	{ PCI_VENDOR_SUNDANCETI,	PCI_PRODUCT_SUNDANCETI_IP100A,
+ 	  "IC Plus Corp. IP00A 10/100 Fast Ethernet Adapter" },
+ 
  	{ PCI_VENDOR_SUNDANCETI,	PCI_PRODUCT_SUNDANCETI_ST201,
  	  "Sundance ST-201 10/100 Ethernet" },
  
Index: ./sys/dev/pci/pcidevs
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/pcidevs,v
retrieving revision 1.855.2.6
diff -c -3 -r1.855.2.6 pcidevs
*** ./sys/dev/pci/pcidevs	10 Jun 2007 20:54:33 -0000	1.855.2.6
--- ./sys/dev/pci/pcidevs	4 Jul 2007 15:11:23 -0000
***************
*** 3296,3301 ****
--- 3296,3302 ----
  product SUN US_IIe	0xa001	UltraSPARC IIe PCI
  
  /* Sundance Technology products */
+ product SUNDANCETI IP100A	0x0200	IP100A 10/100 Ethernet
  product SUNDANCETI ST201	0x0201	ST201 10/100 Ethernet
  product SUNDANCETI ST1023	0x1023	ST1023 Gigabit Ethernet
  product SUNDANCETI ST2021	0x2021	ST2021 Gigabit Ethernet
Index: ./sys/dev/pci/pcidevs.h
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/pcidevs.h,v
retrieving revision 1.854.2.6
diff -c -3 -r1.854.2.6 pcidevs.h
*** ./sys/dev/pci/pcidevs.h	10 Jun 2007 20:56:34 -0000	1.854.2.6
--- ./sys/dev/pci/pcidevs.h	4 Jul 2007 15:11:38 -0000
***************
*** 1,10 ****
! /*	$NetBSD: pcidevs.h,v 1.854.2.6 2007/06/10 20:56:34 bouyer Exp $	*/
  
  /*
   * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
   *
   * generated from:
!  *	NetBSD
   */
  
  /*
--- 1,10 ----
! /*	$NetBSD$	*/
  
  /*
   * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
   *
   * generated from:
!  *	NetBSD: pcidevs,v 1.855.2.6 2007/06/10 20:54:33 bouyer Exp
   */
  
  /*
***************
*** 3303,3308 ****
--- 3303,3309 ----
  #define	PCI_PRODUCT_SUN_US_IIe	0xa001		/* UltraSPARC IIe PCI */
  
  /* Sundance Technology products */
+ #define	PCI_PRODUCT_SUNDANCETI_IP100A	0x0200		/* IP100A 10/100 Ethernet */
  #define	PCI_PRODUCT_SUNDANCETI_ST201	0x0201		/* ST201 10/100 Ethernet */
  #define	PCI_PRODUCT_SUNDANCETI_ST1023	0x1023		/* ST1023 Gigabit Ethernet */
  #define	PCI_PRODUCT_SUNDANCETI_ST2021	0x2021		/* ST2021 Gigabit Ethernet */
Index: ./sys/dev/pci/pcidevs_data.h
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/pcidevs_data.h,v
retrieving revision 1.853.2.6
diff -c -3 -r1.853.2.6 pcidevs_data.h
*** ./sys/dev/pci/pcidevs_data.h	10 Jun 2007 20:56:35 -0000	1.853.2.6
--- ./sys/dev/pci/pcidevs_data.h	4 Jul 2007 15:11:52 -0000
***************
*** 1,10 ****
! /*	$NetBSD: pcidevs_data.h,v 1.853.2.6 2007/06/10 20:56:35 bouyer Exp $	*/
  
  /*
   * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
   *
   * generated from:
!  *	NetBSD
   */
  
  /*
--- 1,10 ----
! /*	$NetBSD$	*/
  
  /*
   * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
   *
   * generated from:
!  *	NetBSD: pcidevs,v 1.855.2.6 2007/06/10 20:54:33 bouyer Exp
   */
  
  /*
***************
*** 11340,11345 ****
--- 11340,11349 ----
  	    "UltraSPARC IIe PCI",
  	},
  	{
+ 	    PCI_VENDOR_SUNDANCETI, PCI_PRODUCT_SUNDANCETI_IP100A,
+ 	    "IP100A 10/100 Ethernet",
+ 	},
+ 	{
  	    PCI_VENDOR_SUNDANCETI, PCI_PRODUCT_SUNDANCETI_ST201,
  	    "ST201 10/100 Ethernet",
  	},
***************
*** 12744,12747 ****
  	    "Video Controller",
  	},
  };
! const int pci_nproducts = 2592;
--- 12748,12751 ----
  	    "Video Controller",
  	},
  };
! const int pci_nproducts = 2593;