Date: Tue, 19 Apr 2016 09:20:54 +0300 From: Daniel Braniss <danny@cs.huji.ac.il> To: Ian Lepore <ian@FreeBSD.org> Cc: =?utf-8?Q?=22Wei=C3=9F=2C_Dr=2E_J=C3=BCrgen=22?= <weiss@uni-mainz.de>, freebsd-arm <freeBSD-arm@freebsd.org> Subject: Re: Odroidc1+ ethernet(dwc0) not working Message-ID: <8093174F-CCA7-47FE-AF96-C7C3AA7CB719@cs.huji.ac.il> In-Reply-To: <1460991896.52955.46.camel@freebsd.org> References: <A0F7E1EB-3208-4DEB-8E3E-538E2D92296D@cs.huji.ac.il> <773D8BC8-EA89-42AA-A251-9DE37F7B9750@cs.huji.ac.il> <da68a99a7c924cee8d3dd78e7dbc3170@uni-mainz.de> <9C393F68-3355-48B0-A21D-00208407D5D0@cs.huji.ac.il> <1460991896.52955.46.camel@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> On 18 Apr 2016, at 18:04, Ian Lepore <ian@FreeBSD.org> wrote: >=20 > On Mon, 2016-04-18 at 12:28 +0300, Daniel Braniss wrote: >>> On 17 Apr 2016, at 18:20, Wei=DF, Dr. J=FCrgen <weiss@uni-mainz.de> >>> wrote: >>>=20 >>> It seems the FreeBSD driver is only able to use the >>> mac address which is already programmed into the nic. >>> So if you use a command in u-boot, which needs and >>> initializes the network, FreeBSD uses the same mac >>> address as u-boot. If not it seems to be random. >>>=20 >> not nice. >> this is what I see: >> ... >> dwc0: <Amlogic Meson Gigabit Ethernet Controller> mem 0xc9410000 >> -0xc9411fff irq 10017 on simplebus0 >> miibus0: <MII bus> on dwc0 >> rgephy0: <RTL8169S/8110S/8211 1000BASE-T media interface> PHY 0 on >> miibus0 >> rgephy0: OUI 0x00e04c, model 0x0011, rev. 6 >> 000baseT-FDX-master, auto >> random: harvesting attach, 8 bytes (4 bits) from rgephy0 >> rgephy1: <RTL8169S/8110S/8211 1000BASE-T media interface> PHY 1 on >> miibus0 >> rgephy1: OUI 0x00e04c, model 0x0011, rev. 6 >> 000baseT-FDX-master, auto >> random: harvesting attach, 8 bytes (4 bits) from rgephy1 >> random: harvesting attach, 8 bytes (4 bits) from miibus0 >> dwc0: bpf attached >> dwc0: Ethernet address: 62:73:64:b7:54:2e >> .. >>=20 >> also, I think that the fact that kenv(1) does not show anything >> means there is something else fishy. >>=20 >> danny >=20 > If you're loading the kernel directly from u-boot, of course kenv is > empty -- where would env vars have come from? It's loader(8) that = sets > up a kernel env as part of loading/launching the kernel. logical my dear Watson :-) >=20 > It's also very common for u-boot to be responsible for setting up a = MAC > address. Otherwise, how would the dwc driver (which works on a = variety > of different unrelated hardware) know where to get one from? On some > boards it's stored in an i2c eeprom, on some it's in a u-boot env var, > on others it's burned into one-time-programmable fuses on the cpu = chip. > Board-specific code in u-boot knows where to find it and program it > into the MAC hardware. I have now 2 sd cards, both have the same mac address when doing bootp but different ones when booting off the sd card. (random generated, but not that random, after reboot, the same mac) >=20 > It's supposed to be possible to set a mac address in the fdt data as > well, but most of our drivers don't look for it there. >=20 it=92s not a good idea to have it in the fdt, since duplicating sd cards = will be a headache! so my project now is to see if I can merge Daisuke-san's image with what=92s in head. >=20 cheers, danny
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8093174F-CCA7-47FE-AF96-C7C3AA7CB719>