summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/cadence/macb.c
diff options
context:
space:
mode:
authorJoachim Eastwood <manabian@gmail.com>2012-11-11 13:56:28 +0000
committerDavid S. Miller <davem@davemloft.net>2012-11-14 18:51:03 -0500
commit3629a6cebcdcfe16f3dbbffcaab25583285a7125 (patch)
tree3b9a312a6c9919e5f1fd0305a0f09aec1a9d8108 /drivers/net/ethernet/cadence/macb.c
parent2dbfdbb912c4b53f022649a7affb0691da1e9bc4 (diff)
downloadlwn-3629a6cebcdcfe16f3dbbffcaab25583285a7125.tar.gz
lwn-3629a6cebcdcfe16f3dbbffcaab25583285a7125.zip
net/macb: clear unused address register
Only the first register set is used for matching but we support getting the initial hw addr from any of the registers. To prevent stale entries and false matches clear unused register sets. This most important for the at91_ether driver where u-boot always uses the 2nd register set. Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cadence/macb.c')
-rw-r--r--drivers/net/ethernet/cadence/macb.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
index ca34efc62bae..edb2aba9045c 100644
--- a/drivers/net/ethernet/cadence/macb.c
+++ b/drivers/net/ethernet/cadence/macb.c
@@ -108,6 +108,14 @@ void macb_set_hwaddr(struct macb *bp)
macb_or_gem_writel(bp, SA1B, bottom);
top = cpu_to_le16(*((u16 *)(bp->dev->dev_addr + 4)));
macb_or_gem_writel(bp, SA1T, top);
+
+ /* Clear unused address register sets */
+ macb_or_gem_writel(bp, SA2B, 0);
+ macb_or_gem_writel(bp, SA2T, 0);
+ macb_or_gem_writel(bp, SA3B, 0);
+ macb_or_gem_writel(bp, SA3T, 0);
+ macb_or_gem_writel(bp, SA4B, 0);
+ macb_or_gem_writel(bp, SA4T, 0);
}
EXPORT_SYMBOL_GPL(macb_set_hwaddr);