public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Florian Fainelli <florian@openwrt•org>
To: Roger Luethi <rl@hellgate•ch>
Cc: netdev@vger•kernel.org, "David S. Miller" <davem@davemloft•net>,
	"Alex G." <mr.nuke.me@gmail•com>
Subject: Re: [PATCH] via-rhine: do not abort due to invalid MAC address
Date: Wed, 2 Mar 2011 19:01:39 +0100	[thread overview]
Message-ID: <201103021901.39849.florian@openwrt.org> (raw)
In-Reply-To: <20110302163233.GA14491@core.hellgate.ch>

Hello,

On Wednesday 02 March 2011 17:32:33 Roger Luethi wrote:
> From: "Alex G." <mr.nuke.me@gmail•com>
> 
> via-rhine drops out of the init code if the hardware provides an invalid
> MAC address. I have several reports of Rhine NICs doing just that. The
> hardware still works, though; continuing the init process gives the user a
> chance to fix the MAC address using "ifconfig ethX hw ether" which appears
> to result in a perfectly useable network adapter.
> 
> Most recent report and patch provided by Alex G.
> 
> Signed-off-by: "Alex G." <mr.nuke.me@gmail•com>
> Signed-off-by: Roger Luethi <rl@hellgate•ch>
> 
> diff --git a/linux-2.6.35.11/drivers/net/via-rhine.c b/via-rhine.c
> index 4930f9d..a1189f4 100644
> --- a/linux-2.6.35.11/drivers/net/via-rhine.c
> +++ b/via-rhine.c
> @@ -766,8 +766,12 @@ static int __devinit rhine_init_one(struct pci_dev
> *pdev,
> 
>  	if (!is_valid_ether_addr(dev->perm_addr)) {
>  		rc = -EIO;
> -		printk(KERN_ERR "Invalid MAC address\n");
> -		goto err_out_unmap;
> +		printk(KERN_ERR "via-rhine: invalid MAC address: %pM. "
> +				"Use ifconfig to configure valid address.\n",
> +				dev->dev_addr);
> +		/* The device may still be used normally if a valid MAC is 
configured
> +		 * We do not consider this a fatal error, and continue 
initialization
> +		 */
>  	}

Why not generate a valid random ethernet address using random_ether_addr() 
instead?
--
Florian

  reply	other threads:[~2011-03-02 18:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-02 16:32 [PATCH] via-rhine: do not abort due to invalid MAC address Roger Luethi
2011-03-02 18:01 ` Florian Fainelli [this message]
2011-03-02 18:11   ` Alex G.
2011-03-02 19:36     ` David Miller
2011-03-02 19:52       ` Roger Luethi
2011-03-02 19:49         ` Alex G.
2011-03-02 20:06         ` Alex G.
2011-03-03 21:42           ` David Miller
2011-03-03 21:51             ` Alex G.
2011-03-03 22:01               ` David Miller
2011-03-03 22:08                 ` Alex G.
2011-03-09 21:30                   ` David Miller

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=201103021901.39849.florian@openwrt.org \
    --to=florian@openwrt$(echo .)org \
    --cc=davem@davemloft$(echo .)net \
    --cc=mr.nuke.me@gmail$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=rl@hellgate$(echo .)ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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