Some ROMs on embedded devices store incorrect values for
the PHY address of the ethernet device.
It looks like the number is sign-extended.
Truncate the value by applying the PHY-address mask to it.
The patch was tested on a bcm47xx embedded system (where the bug
triggers) and a bcm4400 PCI card.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
---
This patch is applied to the netdev tree.
Commit is 5ea79631c0c47d28831a0635e8af9da539d449cd
Index: linux-2.6.24.3/drivers/net/b44.c
===================================================================
--- linux-2.6.24.3.orig/drivers/net/b44.c 2008-01-24 23:58:37.000000000 +0100
+++ linux-2.6.24.3/drivers/net/b44.c 2008-03-26 14:54:13.000000000 +0100
@@ -2066,6 +2066,11 @@ static int __devinit b44_get_invariants(
addr = sdev->bus->sprom.r1.et0mac;
bp->phy_addr = sdev->bus->sprom.r1.et0phyaddr;
}
+ /* Some ROMs have buggy PHY addresses with the high
+ * bits set (sign extension?). Truncate them to a
+ * valid PHY address. */
+ bp->phy_addr &= 0x1F;
+
memcpy(bp->dev->dev_addr, addr, 6);
if (!is_valid_ether_addr(&bp->dev->dev_addr[0])){
--
Greetings Michael.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html| debian developer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Eric W. Biederman | [PATCH 02/10] sysfs: Support for preventing unmounts. |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Linus Torvalds | Re: LSM conversion to static interface |
git: | |
| Antonio Almeida | HTB accuracy for high speed |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 18/37] dccp: Support for Mandatory options |
| Timo Teräs | Re: xfrm_state locking regression... |
