From owner-freebsd-sparc Wed Dec 4 8:14:26 2002 Delivered-To: freebsd-sparc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BBE9C37B401 for ; Wed, 4 Dec 2002 08:14:23 -0800 (PST) Received: from k6.locore.ca (k6.locore.ca [198.96.117.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id 94F3F43EB2 for ; Wed, 4 Dec 2002 08:14:22 -0800 (PST) (envelope-from jake@k6.locore.ca) Received: from k6.locore.ca (jake@localhost.locore.ca [127.0.0.1]) by k6.locore.ca (8.12.6/8.12.6) with ESMTP id gB4GTUxQ050698; Wed, 4 Dec 2002 11:29:30 -0500 (EST) (envelope-from jake@k6.locore.ca) Received: (from jake@localhost) by k6.locore.ca (8.12.6/8.12.6/Submit) id gB4GTU8x050697; Wed, 4 Dec 2002 11:29:30 -0500 (EST) Date: Wed, 4 Dec 2002 11:29:30 -0500 From: Jake Burkholder To: Andrzej Kwiatkowski Cc: freebsd-sparc@FreeBSD.ORG Subject: Re: Multiple interfaces -> one MAC Message-ID: <20021204112929.P35729@locore.ca> References: <20021204160900.F5536-100000@kwiatek.eu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20021204160900.F5536-100000@kwiatek.eu.org>; from kwiatek@tpi.pl on Wed, Dec 04, 2002 at 04:13:33PM +0100 Sender: owner-freebsd-sparc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Apparently, On Wed, Dec 04, 2002 at 04:13:33PM +0100, Andrzej Kwiatkowski said words to the effect of; > > I have got U10 with one internal ethernet Card, > one quad and one Pci network card. > > My banner command in OBP shows: > Ethernet address 8:0:20:a1:fd:47, > > i've set > ok setenv local-mac-address? true > local-mac-address? = true > ok reset > > When my FreeBSD boot-s, i've got > > platinum# ifconfig -a > hme0: flags=8802 mtu 1500 > ether 08:00:20:a1:fd:47 > media: Ethernet autoselect > hme1: flags=8802 mtu 1500 > ether 08:00:20:a1:fd:47 > media: Ethernet autoselect > hme2: flags=8802 mtu 1500 > ether 08:00:20:a1:fd:47 > media: Ethernet autoselect > hme3: flags=8802 mtu 1500 > ether 08:00:20:a1:fd:47 > media: Ethernet autoselect > hme4: flags=8802 mtu 1500 > ether 08:00:20:a1:fd:47 > media: Ethernet autoselect > hme5: flags=8843 mtu 1500 > inet 10.23.12.50 netmask 0xffff0000 broadcast 10.23.255.255 > inet6 fe80::a00:20ff:fea1:fd47%hme5 prefixlen 64 scopeid 0x6 > ether 08:00:20:a1:fd:47 > media: Ethernet autoselect (100baseTX) > status: active > lo0: flags=8049 mtu 16384 > inet6 ::1 prefixlen 128 > inet6 fe80::1%lo0 prefixlen 64 scopeid 0x7 > inet 127.0.0.1 netmask 0xff000000 > platinum# > > Every Card have got one Mac address. > How can i change to every card was showing its own MAC ??? You can use the attached patch, it will make them use their local mac address unconditionally. Given that we're in code freeze I'm not sure when/if this support will be committed. I'm curious why you want them to have different MAC addresses? If they're on separate networks it shouldn't matter right? Also, out of interest, could you post the dmesg lines where hme1 through 4 are probed? Jake Index: if_hme_pci.c =================================================================== RCS file: /home/ncvs/src/sys/dev/hme/if_hme_pci.c,v retrieving revision 1.3 diff -u -r1.3 if_hme_pci.c --- if_hme_pci.c 23 Mar 2002 19:37:11 -0000 1.3 +++ if_hme_pci.c 19 Nov 2002 17:29:13 -0000 @@ -62,6 +62,9 @@ #include #include +#include +#include + #include "miibus_if.h" struct hme_pci_softc { @@ -120,6 +123,7 @@ { struct hme_pci_softc *hsc = device_get_softc(dev); struct hme_softc *sc = &hsc->hsc_hme; + phandle_t node; int error; /* @@ -167,7 +171,10 @@ sc->sc_maco = 0x6000; sc->sc_mifo = 0x7000; - OF_getetheraddr(dev, sc->sc_arpcom.ac_enaddr); + node = ofw_pci_node(dev); + if (OF_getprop(node, "local-mac-address", sc->sc_arpcom.ac_enaddr, + sizeof(sc->sc_arpcom.ac_enaddr)) == -1) + OF_getetheraddr(dev, sc->sc_arpcom.ac_enaddr); sc->sc_burst = 64; /* XXX */ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-sparc" in the body of the message