All of lore.kernel.org
 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: Mon, 22 Aug 2011 18:07:26 +0200	[thread overview]
Message-ID: <201108221807.26804.marek.vasut@gmail.com> (raw)
In-Reply-To: <201108221202.28078.vapier@gentoo.org>

On Monday, August 22, 2011 06:02:26 PM Mike Frysinger wrote:
> On Monday, August 22, 2011 01:11:57 Ajay Bhargav wrote:
> > +	writel((u32) darmdfec->htpr, &regs->htpr);
> 
> do you really need to cast it yourself ?  seems to show up a lot in this
> file.
> 

[...]

> make the reg base a parameter to armada100_fec_initialize()
> 
> > +	darmdfec = malloc(sizeof(struct armdfec_device));
> 
> sizeof(*darmdfec)

Why are you against sizeof(struct ...) ?
> 
> > +	while (!eth_getenv_enetaddr(s, dev->enetaddr)) {
> > +		/* Generate Private MAC addr if not set */
> > +		dev->enetaddr[0] = 0x00;
> > +		dev->enetaddr[1] = 0x50;
> > +		dev->enetaddr[2] = 0x43;
> > +#if defined(CONFIG_SKIP_LOCAL_MAC_RANDOMIZATION)
> > +		/* Generate fixed lower MAC half */
> > +		dev->enetaddr[3] = 0x11;
> > +		dev->enetaddr[4] = 0x22;
> > +		dev->enetaddr[5] = 0x33;
> > +#else
> > +		/* 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
> > +		eth_setenv_enetaddr(s, dev->enetaddr);
> > +	}
> 
> NAK on this whole thing.  initialize dev->write_hwaddr and that is the only
> thing you should do.  the higher eth layers will take care of calling that
> as necessary.

ACK on the comment here.

  reply	other threads:[~2011-08-22 16:07 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
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 [this message]
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=201108221807.26804.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.