* [PATCH] via-rhine: Work around invalid MAC address error
@ 2011-03-09 21:34 Alex G.
2011-03-09 21:44 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Alex G. @ 2011-03-09 21:34 UTC (permalink / raw)
To: netdev; +Cc: Roger Luethi, Florian Fainelli, David S. Miller
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: rhine.patch --]
[-- Type: text/x-patch, Size: 1378 bytes --]
via-rhine drops out of the init code if the hardware provides an invalid
MAC address. Roger Luethi has had several reports of Rhine NICs doing just
that. The hardware still works, though; assigning a random MAC address
allows the NIC to be used as usual. Tested as a standalone interface,
as carrier for ppp, and as bonding slave.
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
diff --git a/drivers/net/via-rhine.c.orig b/drivers/net/via-rhine.c
index 4930f9d..4c1b9e7 100644
--- a/drivers/net/via-rhine.c.orig
+++ b/drivers/net/via-rhine.c
@@ -762,13 +762,16 @@ static int __devinit rhine_init_one(struct pci_dev *pdev,
for (i = 0; i < 6; i++)
dev->dev_addr[i] = ioread8(ioaddr + StationAddr + i);
- memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
- if (!is_valid_ether_addr(dev->perm_addr)) {
- rc = -EIO;
- printk(KERN_ERR "Invalid MAC address\n");
- goto err_out_unmap;
+ if (!is_valid_ether_addr(dev->dev_addr)) {
+ printk(KERN_ERR "via-rhine: Invalid MAC address: %pM. \n",
+ dev->dev_addr);
+ /* The device may still be used normally if a valid MAC is configured */
+ random_ether_addr(dev->dev_addr);
+ printk(KERN_ERR "via-rhine: Using randomly generated address: %pM instead. \n",
+ dev->dev_addr);
}
+ memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
/* For Rhine-I/II, phy_id is loaded from EEPROM */
if (!phy_id)
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] via-rhine: Work around invalid MAC address error
2011-03-09 21:34 [PATCH] via-rhine: Work around invalid MAC address error Alex G.
@ 2011-03-09 21:44 ` David Miller
2011-03-10 2:04 ` Alex G.
0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2011-03-09 21:44 UTC (permalink / raw)
To: mr.nuke.me; +Cc: netdev, rl, florian
From: "Alex G." <mr.nuke.me@gmail.com>
Date: Wed, 09 Mar 2011 23:34:11 +0200
> via-rhine drops out of the init code if the hardware provides an invalid
> MAC address. Roger Luethi has had several reports of Rhine NICs doing just
> that. The hardware still works, though; assigning a random MAC address
> allows the NIC to be used as usual. Tested as a standalone interface,
> as carrier for ppp, and as bonding slave.
>
> Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
>
> diff --git a/drivers/net/via-rhine.c.orig b/drivers/net/via-rhine.c
> index 4930f9d..4c1b9e7 100644
> --- a/drivers/net/via-rhine.c.orig
> +++ b/drivers/net/via-rhine.c
This is getting rediculious:
davem@sunset:~/src/GIT/net-2.6$ git apply --check --whitespace=error-all via-rhine-Work-around-invalid-MAC-address-error.patch
error: drivers/net/via-rhine.c.orig: No such file or directory
davem@sunset:~/src/GIT/net-2.6$
davem@sunset:~/src/GIT/net-2.6$ git am --signoff via-rhine-Work-around-invalid-MAC-address-error.patch
Applying: via-rhine: Work around invalid MAC address error
error: drivers/net/via-rhine.c.orig: does not exist in index
Patch failed at 0001 via-rhine: Work around invalid MAC address error
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".
You have new mail in /var/mail/davem
davem@sunset:~/src/GIT/net-2.6$ git am --abort
Sorry.
I'm going to ignore you're postings for a day or two, I've already
invested an enormous amount of time and energy into getting you to
submit patches which are properly formed and actually get accepted by
the tools that we all use. Nobody else has these kinds of problems
and can submit properly formed patches.
I would strongly suggest that you try to email the patch to yourself,
save the email into a file, and feed it to "git am" on a fresh tree,
making sure that when then looking at what the resulting commit looks
like.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] via-rhine: Work around invalid MAC address error
2011-03-09 21:44 ` David Miller
@ 2011-03-10 2:04 ` Alex G.
0 siblings, 0 replies; 3+ messages in thread
From: Alex G. @ 2011-03-10 2:04 UTC (permalink / raw)
To: David Miller; +Cc: netdev, rl, florian
On 03/09/2011 11:44 PM, David Miller wrote:
> Sorry.
>
Don't sweat it.
> I'm going to ignore you're postings for a day or two,
That means I can bash you and you won't notice too soon.
> I've already
> invested an enormous amount of time and energy into getting you to
> submit patches which are properly formed and actually get accepted by
> the tools that we all use.
You have done nothing more than point me to obsolete documentation, and
bash me after following it. If the the less than five minutes of your
life that you have spent giving me short, uninformative, or outright
wrong information are "an enormous amount of time and energy", please
tell me how much you get paid an hour, so that I can pay you for those
minutes (preferably via PayPal). Please be advised, that I will ask my
bank for a chargeback should it come to this.
> Nobody else has these kinds of problems
> and can submit properly formed patches.
>
I assume this tool is" git". If so, it is called "git" for a reason.
I simply wanted to fix a problem I found. I don't know what tools you
are using, how they work, etc. Please don't expect me to guess. If you
want _everybody_ to get it right the first time, then have the decency
to update the fucking documentation, before insolently directing people
to it.
> I would strongly suggest that you try to email the patch to yourself,
> save the email into a file, and feed it to "git am" on a fresh tree,
> making sure that when then looking at what the resulting commit looks
> like.
Now this is the first useful bit of information you have bothered giving
me this whole time.
Alex
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-03-10 2:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-09 21:34 [PATCH] via-rhine: Work around invalid MAC address error Alex G.
2011-03-09 21:44 ` David Miller
2011-03-10 2:04 ` Alex G.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).