netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] au1000_eth: fix invalid address accessing the MAC enable register
@ 2010-11-23 16:40 Wolfgang Grandegger
  2010-11-28 19:31 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Wolfgang Grandegger @ 2010-11-23 16:40 UTC (permalink / raw)
  To: Netdev; +Cc: Linux-MIPS, Florian Fainelli

"aup->enable" holds already the address pointing to the MAC enable
register. The bug was introduced by commit d0e7cb:

"au1000-eth: remove volatiles, switch to I/O accessors".

CC: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Wolfgang Grandegger <wg@denx.de>
Acked-by: Florian Fainelli <florian@openwrt.org>

---
 drivers/net/au1000_eth.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c
index 43489f8..53eff9b 100644
--- a/drivers/net/au1000_eth.c
+++ b/drivers/net/au1000_eth.c
@@ -155,10 +155,10 @@ static void au1000_enable_mac(struct net_device *dev, int force_reset)
 	spin_lock_irqsave(&aup->lock, flags);
 
 	if (force_reset || (!aup->mac_enabled)) {
-		writel(MAC_EN_CLOCK_ENABLE, &aup->enable);
+		writel(MAC_EN_CLOCK_ENABLE, aup->enable);
 		au_sync_delay(2);
 		writel((MAC_EN_RESET0 | MAC_EN_RESET1 | MAC_EN_RESET2
-				| MAC_EN_CLOCK_ENABLE), &aup->enable);
+				| MAC_EN_CLOCK_ENABLE), aup->enable);
 		au_sync_delay(2);
 
 		aup->mac_enabled = 1;
@@ -503,9 +503,9 @@ static void au1000_reset_mac_unlocked(struct net_device *dev)
 
 	au1000_hard_stop(dev);
 
-	writel(MAC_EN_CLOCK_ENABLE, &aup->enable);
+	writel(MAC_EN_CLOCK_ENABLE, aup->enable);
 	au_sync_delay(2);
-	writel(0, &aup->enable);
+	writel(0, aup->enable);
 	au_sync_delay(2);
 
 	aup->tx_full = 0;
@@ -1119,7 +1119,7 @@ static int __devinit au1000_probe(struct platform_device *pdev)
 	/* set a random MAC now in case platform_data doesn't provide one */
 	random_ether_addr(dev->dev_addr);
 
-	writel(0, &aup->enable);
+	writel(0, aup->enable);
 	aup->mac_enabled = 0;
 
 	pd = pdev->dev.platform_data;
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] au1000_eth: fix invalid address accessing the MAC enable register
  2010-11-23 16:40 [PATCH] au1000_eth: fix invalid address accessing the MAC enable register Wolfgang Grandegger
@ 2010-11-28 19:31 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-11-28 19:31 UTC (permalink / raw)
  To: wg; +Cc: Netdev, linux-mips, florian

From: Wolfgang Grandegger <wg@grandegger.com>
Date: Tue, 23 Nov 2010 17:40:25 +0100

> "aup->enable" holds already the address pointing to the MAC enable
> register. The bug was introduced by commit d0e7cb:
> 
> "au1000-eth: remove volatiles, switch to I/O accessors".
> 
> CC: Florian Fainelli <florian@openwrt.org>
> Signed-off-by: Wolfgang Grandegger <wg@denx.de>
> Acked-by: Florian Fainelli <florian@openwrt.org>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-11-28 19:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-23 16:40 [PATCH] au1000_eth: fix invalid address accessing the MAC enable register Wolfgang Grandegger
2010-11-28 19:31 ` David Miller

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).