Date: Mon, 28 Nov 2011 08:23:54 -0500 From: Andrew Duane <aduane@juniper.net> To: Juli Mallett <jmallett@FreeBSD.org>, Oleksandr Tymoshenko <gonzo@bluezbox.com>, Marcel Moolenaar <marcel@FreeBSD.org> Cc: freebsd-mips <freebsd-mips@FreeBSD.org> Subject: RE: Octeon MAC address Message-ID: <AC6674AB7BC78549BB231821ABF7A9AEB8138203C7@EMBX01-WF.jnpr.net> In-Reply-To: <CACVs6=_D55=PKpxUmuoaLQPhiZ8pb0c1oTha2_uhx4TCwqXBEQ@mail.gmail.com> References: <4C363511-0E3A-4CFD-904A-7EAF776F763A@bluezbox.com> <CACVs6=_D55=PKpxUmuoaLQPhiZ8pb0c1oTha2_uhx4TCwqXBEQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
I have several other fields in the sysinfo structure that are not initialized through the minimal_initialize call, and the MAC address (base + count) is one of them. There are also one or two things that could be removed from the call (e.g. clock speed). I don't know that we should muck with the existing call since it is in the SDK; I was thinking of adding a secondary init call for the rest of the fields. At the moment I just manually set these fields for both U-Boot and other bootstrap cases (with basically the same two lines of code you added). IIRC, the CAPK-0100ND board is correctly called out to set the MAC address offset (to account for the management port), so once you set the base all should be well. I did note that the code that attaches MAC addresses to interfaces does NOT check the count. It "assumes" that you have enough to handle however many interfaces/ports your board declares itself as having. Your patch is fine. My work extends that to some other fields I trip across, and the non-U-Boot case (which doesn't use the octeon_bootinfo structure). ................................... Andrew Duane Juniper Networks +1 978-589-0551 (o) +1 603-770-7088 (m) aduane@juniper.net > -----Original Message----- > From: juli@clockworksquid.com [mailto:juli@clockworksquid.com] On Behalf > Of Juli Mallett > Sent: Sunday, November 27, 2011 9:40 PM > To: Oleksandr Tymoshenko; Andrew Duane; Marcel Moolenaar > Cc: freebsd-mips > Subject: Re: Octeon MAC address > > CCing Andrew and Marcel who had made changes to eliminate the use of > bootinfo. I suspect this is the right change, and hope they'll be > able to take a look at it. You may want to check that other fields > that can be copied from the bootinfo to sysinfo are — obviously > anything not passed to the minimal sysinfo initialize call will not be > available unless we add it explicitly here. > > Good catch! > > Thanks, > Juli. > > On Sun, Nov 27, 2011 at 17:49, Oleksandr Tymoshenko <gonzo@bluezbox.com> > wrote: > > Hello, > > > > I tried booting latest kernel on my CAPK-0100ND board and it seems to > have some issues with initializing > > ethernet: octe0 gets zero MAC address although proper MAC address is > printed earlier: > > > > Boot Descriptor Ver: 7 -> 1/2 CPU clock: 500MHz Core Mask: 0 > > Board Type: 11 Revision: 0/0 > > Mac Address 00.90.FB.26.26.CA (3) > > > > > > > > This simple patch fixes the issue: > > http://people.freebsd.org/~gonzo/mips/octeon-mac.diff > > > > I do not have enough experience with octeon's boot descriptor so I am > not sure if it's a proper fix > > for this issue or it should be fixed in octeon-sdk sources. Could > someone with more expertise > > take a look at it? > > > > > > > > _______________________________________________ > > freebsd-mips@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-mips > > To unsubscribe, send any mail to "freebsd-mips- > unsubscribe@freebsd.org" > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AC6674AB7BC78549BB231821ABF7A9AEB8138203C7>
