All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Rodolfo Giometti <giometti@linux.it>, linux-mips@linux-mips.org
Subject: Re: au1000_lowlevel_probe on au1000_eth.c
Date: Thu, 29 Jun 2006 19:03:51 +0400	[thread overview]
Message-ID: <44A3EBD7.8090408@ru.mvista.com> (raw)
In-Reply-To: <20060627155914.GD10595@enneenne.com>

Hello.

Rodolfo Giometti wrote:
> On Tue, Jun 27, 2006 at 12:14:41AM +0200, Rodolfo Giometti wrote:

>>I notice that during sleep/wakeup au1000_lowlevel_probe() tries to
>>access to variables arcs_cmdline,prom_envp & Co.. This sometime does
>>an oops.

> Here my proposal to avoid oops during wake up.

    This is against your rewrite, if I don't mistake?

> Ciao,

> Rodolfo

WBR, Sergei

> ------------------------------------------------------------------------
> 
> diff --git a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c
> index 341fdc4..c49004a 100644
> --- a/drivers/net/au1000_eth.c
> +++ b/drivers/net/au1000_eth.c
> @@ -1419,24 +1419,25 @@ au1000_lowlevel_probe(struct net_device 
>  	/* Setup some variables for quick register address access */
>  	if (port_num == 0)
>  	{
> -		/* check env variables first */
> -		if (!get_ethernet_addr(ethaddr)) { 
> -			memcpy(au1000_mac_addr, ethaddr, sizeof(au1000_mac_addr));
> -		} else {
> -			/* Check command line */
> -			argptr = prom_getcmdline();
> -			if ((pmac = strstr(argptr, "ethaddr=")) == NULL) {
> -				printk(KERN_INFO "%s: No mac address found\n", 
> -						ndev->name);
> -				/* use the hard coded mac addresses */
> +		if (!skip_prom) {
> +			/* check env variables first */
> +			if (!get_ethernet_addr(ethaddr)) { 
> +				memcpy(au1000_mac_addr, ethaddr, sizeof(au1000_mac_addr));
>  			} else {
> -				str2eaddr(ethaddr, pmac + strlen("ethaddr="));
> -				memcpy(au1000_mac_addr, ethaddr, 
> -						sizeof(au1000_mac_addr));
> +				/* Check command line */
> +				argptr = prom_getcmdline();
> +				if ((pmac = strstr(argptr, "ethaddr=")) == NULL) {
> +					printk(KERN_INFO "%s: No mac address found\n", 
> +							ndev->name);
> +					/* use the hard coded mac addresses */
> +				} else {
> +					str2eaddr(ethaddr, pmac + strlen("ethaddr="));
> +					memcpy(au1000_mac_addr, ethaddr, 
> +							sizeof(au1000_mac_addr));
> +				}
>  			}

    Hrm, wouldn't it be better to put this stuff into a separate function then?

WBR, Sergei

  reply	other threads:[~2006-06-29 15:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-26 22:14 au1000_lowlevel_probe on au1000_eth.c Rodolfo Giometti
2006-06-27  6:36 ` Ulrich Eckhardt
2006-06-27  7:34   ` Rodolfo Giometti
2006-06-27 15:59 ` Rodolfo Giometti
2006-06-29 15:03   ` Sergei Shtylyov [this message]
2006-06-29 15:11     ` Rodolfo Giometti
2006-07-02 19:22       ` Sergei Shtylyov

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=44A3EBD7.8090408@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=giometti@linux.it \
    --cc=linux-mips@linux-mips.org \
    /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.