public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom <Tom.Rix@windriver.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ARM: OMAP3: Refactors the SM911x driver
Date: Thu, 22 Oct 2009 08:16:03 -0500	[thread overview]
Message-ID: <4AE05B13.1000409@windriver.com> (raw)
In-Reply-To: <1256055678-5382-1-git-send-email-dirk.behme@googlemail.com>

Dirk Behme wrote:
> From: Steve Sakoman <sakoman@gmail.com>
> 
> Move the test up in the function to not hang on systems without ethernet.
> 
> Signed-off-by: Steve Sakoman <sakoman@gmail.com>
> Acked-by: Ben Warren <biggerbadderben@gmail.com>
> 

Dirk,
Thanks for reposting this.
I will push this to arm.
Ack.
Tom

---
>  drivers/net/smc911x.c |   12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> Index: u-boot-arm/drivers/net/smc911x.c
> ===================================================================
> --- u-boot-arm.orig/drivers/net/smc911x.c
> +++ u-boot-arm/drivers/net/smc911x.c
> @@ -249,6 +249,12 @@ int smc911x_initialize(u8 dev_num, int b
>  
>  	dev->iobase = base_addr;
>  
> +	/* Try to detect chip. Will fail if not present. */
> +	if (smc911x_detect_chip(dev)) {
> +		free(dev);
> +		return 0;
> +	}
> +
>  	addrh = smc911x_get_mac_csr(dev, ADDRH);
>  	addrl = smc911x_get_mac_csr(dev, ADDRL);
>  	dev->enetaddr[0] = addrl;
> @@ -264,12 +270,6 @@ int smc911x_initialize(u8 dev_num, int b
>  	dev->recv = smc911x_rx;
>  	sprintf(dev->name, "%s-%hu", DRIVERNAME, dev_num);
>  
> -	/* Try to detect chip. Will fail if not present. */
> -	if (smc911x_detect_chip(dev)) {
> -		free(dev);
> -		return 0;
> -	}
> -
>  	eth_register(dev);
>  	return 0;
>  }
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

      reply	other threads:[~2009-10-22 13:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-20 16:21 [U-Boot] [PATCH] ARM: OMAP3: Refactors the SM911x driver Dirk Behme
2009-10-22 13:16 ` Tom [this message]

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=4AE05B13.1000409@windriver.com \
    --to=tom.rix@windriver.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