All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Warren <bwarren@qstreams.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] DM9000 driver
Date: Tue, 21 Aug 2007 09:25:35 -0400	[thread overview]
Message-ID: <46CAE7CF.9000602@qstreams.com> (raw)
In-Reply-To: <46CAC398.2030706@denx.de>

stefano babic wrote:
> The logic to check if there is a correct MAC address in the DM9000 
> EEPROM, added in the last patch, is wrong.
> Now the MAC address is always taken from the environment, even if a 
> suitable MAC is present in the EEPROM.
>
> Signed-off-by: Stefano Babic <sbabic@denx.de>
>
>   
Your patch is backwards (stuff to remove should be - and to add should 
be +), and so won't apply.  The same goes for the TFTP one.
> ------------------------------------------------------------------------
>
> >From 432445542c9ebc11cc9d4ed4200de3671a2cf029 Mon Sep 17 00:00:00 2001
> From: Stefano Babic <sbabic@denx.de>
> Date: Tue, 21 Aug 2007 12:46:34 +0200
> Subject: [PATCH] The logic to check if there is a correct MAC address in the DM9000 EEPROM,
> added in the last patch, is wrong.
> Now the MAC address is always taken from the environment, even if a suitable MAC
> is present in the EEPROM. Time to wait reading the EEPROM is set to 8ms
> according to the linux driver
> ---
>  drivers/dm9000x.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/dm9000x.c b/drivers/dm9000x.c
> index e0d531b..78acb09 100644
> --- a/drivers/dm9000x.c
> +++ b/drivers/dm9000x.c
> @@ -303,8 +303,8 @@ eth_init(bd_t * bd)
>  	for (i = 0; i < 6; i++)
>  		((u16 *) bd->bi_enetaddr)[i] = read_srom_word(i);
>  
> -	if (is_zero_ether_addr(bd->bi_enetaddr) ||
> -	    is_multicast_ether_addr(bd->bi_enetaddr)) {
> +	if (!is_zero_ether_addr(bd->bi_enetaddr) &&
> +	    !is_mutlicast_ether_addr(bd->bi_enetaddr)) {
>  		/* try reading from environment */
>  		u8 i;
>  		char *s, *e;
> @@ -542,7 +542,7 @@ read_srom_word(int offset)
>  {
>  	DM9000_iow(DM9000_EPAR, offset);
>  	DM9000_iow(DM9000_EPCR, 0x4);
> -	udelay(8000);
> +	udelay(200);
>   
Does the 200us delay not work, or are you just doing this to match the 
Linux driver?

  reply	other threads:[~2007-08-21 13:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-21 10:51 [U-Boot-Users] [PATCH] DM9000 driver stefano babic
2007-08-21 13:25 ` Ben Warren [this message]
2007-08-21 13:50   ` stefano babic
2007-08-29  0:13     ` Wolfgang Denk

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=46CAE7CF.9000602@qstreams.com \
    --to=bwarren@qstreams.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.