[PATCH u-boot v2 0/5] Only call aspeednic_init when preparing to use network
Cyril Bur
cyrilbur at gmail.com
Thu Mar 17 10:59:31 AEDT 2016
On Tue, 15 Mar 2016 18:00:56 -0500
OpenBMC Patches <openbmc-patches at stwcx.xyz> wrote:
> The aspeednic driver was calling init from its initialization function and
> calling halt later. This left the DMA engine running and writing to
> memory when Ethernet traffic arrived when control was handed off
> to the operating system.
>
> Remove this call to init and rely on the framework to call
> write_hwaddr with the assigned MAC address.
>
> In addition upstream discourages setting the random address in
> drivers. Later upstream created a config for this behavior and I
> back-ported that patch.
>
> In my testing, the random mac address is about 90% 1 value after a
> u-boot reset command but after a kernel reboot it does not repeat.
>
> The code uses rand with timer as the seed source; the network stack
> then uses the mac as the seed for random delays. We may prefer
> to only configure u-boot setting a random mac only after a better
> source of entropy, letting the kernel use its sources to set it when
> we do not net-boot.
>
> milton
>
Hi Milton,
Looks good, I agree with your thoughts for patch 5/5. The way you have is
safest so happy with that.
Reviewed-by: Cyril Bur <cyrilbur at gmail.com>
for the series.
> <!-- Reviewable:start -->
> ---
>
> v2: update README and README.ethaddr with backported CONFIG var name.
>
> This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Review on Reviewable"/>](https://reviewable.io/reviews/openbmc/u-boot/4)
> <!-- Reviewable:end -->
>
>
> https://github.com/openbmc/u-boot/pull/4
>
> Joe Hershberger (1):
> net: Implement random ethaddr fallback in eth.c
>
> Milton D. Miller II (4):
> net: aspeednic: Create aspeed_write_hwaddr from set_mac_address
> net: aspeednic: Do not start hardware in initialize
> net: aspeednic: Remove extra spaces before assignments
> net: aspeednic: Do not fill in a random MAC address
>
> README | 3 ++-
> doc/README.enetaddr | 2 ++
> drivers/net/aspeednic.c | 31 ++++++++++++++-----------------
> net/eth.c | 13 ++++++++++++-
> 4 files changed, 30 insertions(+), 19 deletions(-)
>
More information about the openbmc
mailing list