Subject: kern/28476: MAC-Adresses on Intel-Dualchannel-Gigabit-Card not set correctly
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Wolfgang Stukenbrock <wgstuken@s012.nagler-company.com>
List: netbsd-bugs
Date: 11/30/2004 11:12:00
>Number: 28476
>Category: kern
>Synopsis: MAC-Adresses on Intel-Dualchannel-Gigabit-Card not set correctly
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Nov 30 11:12:00 +0000 2004
>Originator: wgstuken@nagler-company.com
>Release: NetBSD 2.0_RC5
>Organization:
>Environment:
System: NetBSD s012 2.0_RC5 NetBSD 2.0_RC5 (S012) #6: Tue Nov 30 11:38:39 CET 2004 wgstuken@s012:/export/netbsd-2.0rc4/src/sys/arch/i386/compile/S012 i386
Architecture: i386
Machine: i386
>Description:
On the dual-channel Gigabit-card both MAC adresses are set to the same address.
This makes the card unusable on managed Networkcomponents - the switches gets confused ..
The problem is located in /usr/src/sys/dev/pci/if_wm.c.
It looks like that someone forgot to expand the "if-statement" that will control
the modification of the MAC-address after the chip-flag WM_T_82546 has been extended
by a new version WM_T_82546_3.
The fix is clear - just add the new flag WM_T_82546_3 to the if statement.
The modification has been tested on a machine, that has two dual-channel Cards and works fine.
W. Stukenbrock
>How-To-Repeat:
not relevant
>Fix:
*** if_wm.c.orig Tue Nov 30 11:44:29 2004
--- if_wm.c Tue Nov 30 11:38:01 2004
***************
*** 1049,1055 ****
* Toggle the LSB of the MAC address on the second port
* of the i82546.
*/
! if (sc->sc_type == WM_T_82546) {
if ((CSR_READ(sc, WMREG_STATUS) >> STATUS_FUNCID_SHIFT) & 1)
enaddr[5] ^= 1;
}
--- 1049,1055 ----
* Toggle the LSB of the MAC address on the second port
* of the i82546.
*/
! if (sc->sc_type == WM_T_82546 || sc->sc_type == WM_T_82546_3) {
if ((CSR_READ(sc, WMREG_STATUS) >> STATUS_FUNCID_SHIFT) & 1)
enaddr[5] ^= 1;
}