public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3] net: Adds Fast Ethernet Controller driver for Armada100
Date: Tue, 23 Aug 2011 12:33:30 +0200	[thread overview]
Message-ID: <201108231233.30991.marek.vasut@gmail.com> (raw)
In-Reply-To: <948373945.121424.1314079917382.JavaMail.root@ahm.einfochips.com>

On Tuesday, August 23, 2011 08:11:57 AM Ajay Bhargav wrote:
> ----- "Marek Vasut" <marek.vasut@gmail.com> wrote:
> > On Monday, August 22, 2011 07:11:57 AM Ajay Bhargav wrote:
> > > This patch adds support for Fast Ethernet Controller driver for
> > > Armada100 series.
> > > 
> > > Signed-off-by: Ajay Bhargav <ajay.bhargav@einfochips.com>
> > > ---
> > > 
> > >  arch/arm/include/asm/arch-armada100/armada100.h |    1 +
> > >  drivers/net/Makefile                            |    1 +
> > >  drivers/net/armada100_fec.c                     |  802
> > > 
> > > +++++++++++++++++++++++ drivers/net/armada100_fec.h
> > > 
> > > 225 +++++++
> > > 
> > >  include/netdev.h                                |    1 +
> > >  5 files changed, 1030 insertions(+), 0 deletions(-)
> > >  create mode 100644 drivers/net/armada100_fec.c
> > >  create mode 100644 drivers/net/armada100_fec.h
> 
> [...]
> 
> > > +static u8 get_random_byte(u8 seed)
> > > +{
> > > +	udelay(seed * 1000);
> > > +	return (u8)(read_timer());
> > 
> > Parens not needed, anyway, don't we have any better "random()" here ?
> 
> I could not find random() function anywhere in the u-boot source.
> 
> [...]
> 
> > > +		/* Generate random lower MAC half */
> > > +		dev->enetaddr[3] = get_random_byte((u8)read_timer());
> > > +		dev->enetaddr[4] = get_random_byte(dev->enetaddr[3]);
> > > +		dev->enetaddr[5] = get_random_byte(dev->enetaddr[4]);
> > > +#endif
> > 
> > Won't uboot handle this ... or aren't there some mechanisms to
> > generate random
> > MAC that can be reused?
> 
> There is a program given in tools directory for generating ethernet mac
> "gen_eth_addr.c" but nothing as such in u-boot source as far as i checked.
> 
> Please let me know if I missed something to check.

Hi,

I think someone NAKed this whole part with MAC randomisation and he was right 
about it ... you're supposed to configure the MAC properly yourself. Cheers
> 
> Thanks & Regards,
> Ajay Bhargav

  reply	other threads:[~2011-08-23 10:33 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-22  5:11 [U-Boot] [PATCH 1/3] net: Adds Fast Ethernet Controller driver for Armada100 Ajay Bhargav
2011-08-22 12:53 ` Marek Vasut
2011-08-23  5:31   ` Ajay Bhargav
2011-08-23  6:11   ` Ajay Bhargav
2011-08-23 10:33     ` Marek Vasut [this message]
2011-08-23 10:29       ` Ajay Bhargav
2011-08-23 11:06         ` Wolfgang Denk
2011-08-23 11:41           ` Ajay Bhargav
2011-08-23 12:59           ` Ajay Bhargav
2011-08-23 13:34             ` Wolfgang Denk
2011-08-23 15:30               ` Ralph Metzler
2011-08-23 17:21                 ` Mike Frysinger
2011-08-23 17:43                 ` Wolfgang Denk
2011-08-24  5:09               ` Ajay Bhargav
2011-08-22 16:02 ` Mike Frysinger
2011-08-22 16:07   ` Marek Vasut
2011-08-22 16:42     ` Mike Frysinger
2011-08-22 16:45       ` Marek Vasut
2011-08-22 17:11         ` Mike Frysinger
2011-08-22 18:19           ` jason.hobbs at calxeda.com
2011-08-23  5:36   ` Ajay Bhargav

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201108231233.30991.marek.vasut@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox