Subject: None
To: Christoph Kaegi <kgc@zhwin.ch>
From: Jonathan Stone <jonathan@dsg.stanford.edu>
List: tech-net
Date: 01/29/2005 16:06:53
In message <E1Cv1Md-0005ty-00@smeg.dsg.stanford.edu>,
Jonathan Stone writes:
>In message <20050128143401.GA25506@zhwin.ch>,
>Christoph Kaegi writes:
[...]
>>Maybe this could be integrated into the NetBSD sourcecode?
[...]
>I dont think the change is suitable as it stands. [...]
Completely untested, but maybe this will do the trick? Though i have
no clue if the last hunk is correct; we'd have to check whether any of
the older 1000baseX boards set EEPROM_CFG1_ILOS. Maybe Jason Thorpe
can help there.
Also, have you double-checked that you are not getting duplicate MAC
addresses on each port, when you don't toggle the low-order bit of the
MAC address on the second PCI function? All the copper 82546 chips
I've seen really do have identical MAC addresses on both ports.
--- sys/dev/pci/if_wm.c 2004-12-30 14:52:43.000000000 -0800
+++ sys/dev/pci/if_wm.c.jrs 2005-01-29 16:00:40.000000000 -0800
@@ -575,11 +575,11 @@
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82545GM_FIBER,
"Intel i82545GM 1000BASE-X Ethernet",
WM_T_82545_3, WMP_F_1000X },
-#if 0
+
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82545GM_SERDES,
"Intel i82545GM Gigabit Ethernet (SERDES)",
WM_T_82545_3, WMP_F_SERDES },
-#endif
+
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82546EB_COPPER,
"Intel i82546EB 1000BASE-T Ethernet",
WM_T_82546, WMP_F_1000T },
@@ -603,11 +603,11 @@
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82546GB_FIBER,
"Intel i82546GB 1000BASE-X Ethernet",
WM_T_82546_3, WMP_F_1000X },
-#if 0
+
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82546GB_SERDES,
"Intel i82546GB Gigabit Ethernet (SERDES)",
WM_T_82546_3, WMP_F_SERDES },
-#endif
+
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82541EI,
"Intel i82541EI 1000BASE-T Ethernet",
WM_T_82541, WMP_F_1000T },
@@ -1091,9 +1091,10 @@
/*
* Toggle the LSB of the MAC address on the second port
- * of the i82546.
+ * of the i82546. But allegedly not on internal-SERDES 82546GB?
*/
- if (sc->sc_type == WM_T_82546 || sc->sc_type == WM_T_82546_3) {
+ if (sc->sc_type == WM_T_82546 ||
+ (sc->sc_type == WM_T_82546_3 && !(wmp->wmp_flags & WMP_F_1000X)) {
if ((CSR_READ(sc, WMREG_STATUS) >> STATUS_FUNCID_SHIFT) & 1)
enaddr[5] ^= 1;
}
@@ -1123,7 +1124,7 @@
}
}
- if (cfg1 & EEPROM_CFG1_ILOS)
+ if ((cfg1 & EEPROM_CFG1_ILOS) && !(wmp->wmp_flags & WMP_F_1000X))
sc->sc_ctrl |= CTRL_ILOS;
if (sc->sc_type >= WM_T_82544) {
sc->sc_ctrl |=