[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

kernel/1860: dc-driver uses same MAC address for all ports on multiport cards




>Number:         1860
>Category:       kernel
>Synopsis:       the dc-driver uses the same MAC-address for all ports on a multiport card
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jun  8 11:10:01 MDT 2001
>Last-Modified:
>Originator:     Henning Brauer
>Organization:
* Henning Brauer, hostmaster@bsws.de, http://www.bsws.de *
* Roedingsmarkt 14, 20459 Hamburg, Germany               *
>Release:        at least 2.8 and up, not tested with versions < 2.8
>Environment:
	
	System      : OpenBSD 2.9
	Architecture: OpenBSD.i386
	Machine     : i386
>Description:
have a look at this dmesg:
ppb1 at pci0 dev 8 function 0 "DEC DECchip 21152 PCI-PCI" rev 0x03
pci2 at ppb1 bus 2
dc0 at pci2 dev 0 function 0 "DEC DECchip 21142/3" rev 0x41: irq 10 address 00:00:cb:26:11:bc
icsphy0 at dc0 phy 5: ICS1892 10/100 media interface, rev. 0
dc1 at pci2 dev 4 function 0 "DEC DECchip 21142/3" rev 0x41: irq 10 address 00:00:cb:26:11:bc
icsphy1 at dc1 phy 5: ICS1892 10/100 media interface, rev. 0
dc2 at pci2 dev 8 function 0 "DEC DECchip 21142/3" rev 0x41: irq 10 address 00:00:cb:26:11:bc
icsphy2 at dc2 phy 5: ICS1892 10/100 media interface, rev. 0
dc3 at pci2 dev 12 function 0 "DEC DECchip 21142/3" rev 0x41: irq 10 address 00:00:cb:26:11:bc
icsphy3 at dc3 phy 5: ICS1892 10/100 media interface, rev. 0
ppb2 at pci0 dev 9 function 0 "DEC DECchip 21152 PCI-PCI" rev 0x03
pci3 at ppb2 bus 3
dc4 at pci3 dev 0 function 0 "DEC DECchip 21142/3" rev 0x41: irq 11 address 00:00:cb:26:11:cc
icsphy4 at dc4 phy 5: ICS1892 10/100 media interface, rev. 0
dc5 at pci3 dev 4 function 0 "DEC DECchip 21142/3" rev 0x41: irq 11 address 00:00:cb:26:11:cc
icsphy5 at dc5 phy 5: ICS1892 10/100 media interface, rev. 0
dc6 at pci3 dev 8 function 0 "DEC DECchip 21142/3" rev 0x41: irq 11 address 00:00:cb:26:11:cc
icsphy6 at dc6 phy 5: ICS1892 10/100 media interface, rev. 0
dc7 at pci3 dev 12 function 0 "DEC DECchip 21142/3" rev 0x41: irq 11 address 00:00:cb:26:11:cc
icsphy7 at dc7 phy 5: ICS1892 10/100 media interface, rev. 0

As you can see there are two 4port cards installed. each 4 interfaces are
assigned the same MAC address. The de driver does all right.
>How-To-Repeat:
Well, have such a card ;-))
>Fix:
The port index needs to be added to the MAC address' last byte. Look at this
excerpt from if_de_pci.c:

    /*
     * If this is a multiple port card, add the adapter index to the last
     * byte of the hardware address.  (if it isn't multiport, adding 0
     * won't hurt.
     */
    sc->tulip_enaddr[5] += idx1;

(around line 2438)

If I only could have figured out how to get the port index I'd have fixed
this myself...

>Audit-Trail:
>Unformatted: