All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Rapoport <mike@compulab.co.il>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] Add ability to take MAC address from the environment to DM9000 driver
Date: Wed, 08 Aug 2007 10:10:21 +0300	[thread overview]
Message-ID: <46B96C5D.60505@compulab.co.il> (raw)
In-Reply-To: <20070808064804.F22F2353428@atlas.denx.de>

Wolfgang Denk wrote:
> In message <46B9563B.1010807@compulab.co.il> you wrote:
>>> Could this ever be other than the first Ethernet controller on a board? 
>>> If so, 'ethaddr' won't cut it.
>> If a board has more than one DM9000, the driver in its current state does not 
>> support it anyway.
> 
> Assume the board has an XXX Ethernet controller as eth0, and a DM9000
> as eth1 ?

The only solution I can think of in this case is adding some
#define CONFIG_DM9000_ETHER_INDEX
in the board config
and approptiate '#if' clauses in the driver.
If it's Ok with you I'll do it and resend the patch.
Still, the configuration you mention seems very theoretical for me and I can 
hardly imagine someone designing a board with such configuration.

>>> Please choose a better name for this function. While multicast addresses 
>>> are poor choices for source, they're perfectly fine for destination.
>> What about 'is_valid_ether_src_addr'?
> 
> That's a very long name which is difficult to read, difficult to type,
> and makes for very long source code lines...
> 
> And I will probably have to look up the definition of  this  function
> each  time  I read the code. You use this function exactly once, so I
> suggest to NOT define it at all and write down what it does:
> 
> 	if (!is_multicast_ether_addr(addr) && !is_zero_ether_addr(addr)) ...
> 
> This is IMHO much better to read and to understand.

I agree and I'll fix it.

> Best regards,
> 
> Wolfgang Denk
> 


-- 
Sincerely yours,
Mike.

  reply	other threads:[~2007-08-08  7:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-07 10:32 [U-Boot-Users] [PATCH] Add ability to take MAC address from the environment to DM9000 driver Mike Rapoport
2007-08-07 14:56 ` Wolfgang Denk
2007-08-07 15:29   ` Mike Rapoport
2007-08-09 21:04     ` Wolfgang Denk
2007-08-09 21:10       ` Wolfgang Denk
2007-08-12  5:48         ` Mike Rapoport
2007-08-13 14:32           ` Ben Warren
2007-08-07 14:57 ` Wolfgang Denk
2007-08-07 16:07 ` Ben Warren
2007-08-08  5:35   ` Mike Rapoport
2007-08-08  6:48     ` Wolfgang Denk
2007-08-08  7:10       ` Mike Rapoport [this message]
2007-08-08 15:41         ` Ben Warren

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=46B96C5D.60505@compulab.co.il \
    --to=mike@compulab.co.il \
    --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.