Subject: Re: wm(4) with i82546GB on an AlphaServer ES40
To: NetBSD/alpha Discussion List <port-alpha@NetBSD.ORG>
From: Greg A. Woods <woods@weird.com>
List: tech-net
Date: 03/12/2005 01:14:12
[ On Friday, March 11, 2005 at 18:37:48 (-0800), Matt Thomas wrote: ]
> Subject: Re: wm(4) with i82546GB on an AlphaServer ES40
>
> Have you run a profiling kernel to see where it's spending its time?

Hmmm.... no, I haven't.  I suppose I might try it....  Maybe I'll get it
to build it's own profiling kernel....   Hmmm... I should have put
source sets of my -current tree on a CD before I went up to where the
machine is earlier this evening....


FYI I can't get both ports on this i82546GB card to work at once --
though that may be simply because I made the most naive simple changes
to get it recognized by the driver in netbsd-1-6 (attached).  Even just
bringing the interface up ("ifconfig wm1 up") without an address causes
the other to fail to transmit anything (though it seems to continue to
receive OK).

Also when wm1 is up it causes some strange problem with a second DE500
(tlp1) that's installed in the machine.  Turning both up at the same
time cause all kinds of bizarre errors that I don't thing I've seen
before, even to the extent of once causing a wild "panic: trap" loop of
sorts during ifconfig (that only the reset button had any effect at
stopping, the halt button did nothing at all).  Turning off wm1 allows
all of wm0, tlp0, and tlp1 to work simultaneously though.  This is
reminiscent of other DMA conflicts I've seen before though.  So I'm
guessing my patch to support the i82546GB is insufficient and that's the
most likely cause of the problem....

-- 
						Greg A. Woods

H:+1 416 218-0098  W:+1 416 489-5852 x122  VE3TCP  RoboHack <woods@robohack.ca>
Planix, Inc. <woods@planix.com>          Secrets of the Weird <woods@weird.com>


Index: sys/dev/pci/if_wm.c
===================================================================
RCS file: /cvs/master/m-NetBSD/main/src/sys/dev/pci/if_wm.c,v
retrieving revision 1.9.4.9
diff -u -r1.9.4.9 if_wm.c
--- sys/dev/pci/if_wm.c	16 Jun 2003 13:44:27 -0000	1.9.4.9
+++ sys/dev/pci/if_wm.c	12 Mar 2005 04:41:25 -0000
@@ -293,6 +293,7 @@
 #define	WM_T_82540		4	/* i82540 */
 #define	WM_T_82545		5	/* i82545 */
 #define	WM_T_82546		6	/* i82546 */
+#define	WM_T_82546_3		7	/* i82546 3.0+ */
 
 /* sc_flags */
 #define	WM_F_HAS_MII		0x01	/* has MII */
@@ -488,6 +489,14 @@
 	  "Intel i82546EB 1000BASE-X Ethernet",
 	  WM_T_82546,		WMP_F_1000X },
 
+	{ PCI_VENDOR_INTEL,	PCI_PRODUCT_INTEL_82546GB_COPPER,
+	  "Intel i82546GB 1000BASE-T Ethernet",
+	  WM_T_82546_3,		WMP_F_1000T },
+
+	{ PCI_VENDOR_INTEL,	PCI_PRODUCT_INTEL_82546GB_FIBER,
+	  "Intel i82546GB 1000BASE-X Ethernet",
+	  WM_T_82546_3,		WMP_F_1000X },
+
 	{ PCI_VENDOR_INTEL,	PCI_PRODUCT_INTEL_82540EM_LOM,
 	  "Intel i82540EM (LOM) 1000BASE-T Ethernet",
 	  WM_T_82540,		WMP_F_1000T },