Subject: kern/21881: wm driver change to support mobile chips
To: None <gnats-bugs@gnats.netbsd.org>
From: None <jonl@yubyub.net>
List: netbsd-bugs
Date: 06/14/2003 10:02:43
>Number:         21881
>Category:       kern
>Synopsis:       wm driver change to support mobile chips
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Jun 14 18:03:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     jonl
>Release:        NetBSD 1.6.1
>Organization:
	
>Environment:
	
	
System: NetBSD slog 1.6.1 NetBSD 1.6.1 (SLOG) #1: Sat Jun 14 07:58:38 EDT 2003 root@slog:/usr/src/sys/arch/i386/compile/SLOG i386
Architecture: i386
Machine: i386
>Description:
The Intel Mobile Gigabit chip used in some laptops (sepcifcally my Thinkpad T40) is similar to other chips supported by the wm driver.  The changes included simply allow the wm driver to grok the Mobile Gigabit's pci dev.  1.6.1 doesn't supported the driver by default, however, adding the pci dev into the usual places seems to fix all that.
	
>How-To-Repeat:
	
	n/a
>Fix:
	

The following patches seem to do the trick.  Please validate the changes - it's been quite a while since I've even looked in the kernel, so I may not have followed the preferred/logical way.

--- if_wm.c.org	Sat Jun 14 08:18:31 2003
+++ if_wm.c	Sat Jun 14 08:19:37 2003
@@ -492,6 +492,10 @@
 	  "Intel i82540EM (LOM) 1000BASE-T Ethernet",
 	  WM_T_82540,		WMP_F_1000T },
 
+	{ PCI_VENDOR_INTEL,	PCI_PRODUCT_INTEL_82540EM_LM,
+	  "Intel i82540EM (LM) Mobile 1000BASE-T Ethernet",
+	  WM_T_82540,		WMP_F_1000T },
+
 	{ 0,			0,
 	  NULL,
 	  0,			0 },



--- pcidevs.h.org	Sat Jun 14 08:18:02 2003
+++ pcidevs.h	Sat Jun 14 08:18:48 2003
@@ -1351,6 +1351,7 @@
 #define	PCI_PRODUCT_INTEL_82545EM_FIBER	0x1011		/* i82545EM Gigabit Ethernet (1000BASE-X) */
 #define	PCI_PRODUCT_INTEL_82546EB_FIBER	0x1012		/* i82546EB Gigabit Ethernet (1000BASE-X) */
 #define	PCI_PRODUCT_INTEL_82540EM_LOM	0x1015		/* i82540EM (LOM) Gigabit Ethernet */
+#define	PCI_PRODUCT_INTEL_82540EM_LM	0x101e		/* i82540EM (LM) Mobile Gigabit Ethernet */
 #define	PCI_PRODUCT_INTEL_IN_BUSINESS	0x1030		/* InBusiness Fast Ethernet LAN Controller */
 #define	PCI_PRODUCT_INTEL_PRO_100_VE_0	0x1031		/* PRO/100 VE Network Controller */
 #define	PCI_PRODUCT_INTEL_PRO_100_VE_1	0x1032		/* PRO/100 VE Network Controller */



--- pcidevs_data.h.org	Sat Jun 14 08:18:27 2003
+++ pcidevs_data.h	Sat Jun 14 08:19:49 2003
@@ -3412,6 +3412,12 @@
 	    "i82540EM (LOM) Gigabit Ethernet",
 	},
 	{
+	    PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82540EM_LM,
+	    0,
+	    "Intel",
+	    "i82540EM (LM) Mobile Gigabit Ethernet",
+	},
+	{
 	    PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_IN_BUSINESS,
 	    0,
 	    "Intel",
>Release-Note:
>Audit-Trail:
>Unformatted: