ar71xx: flush mii register writes
authorGabor Juhos <juhosg@openwrt.org>
Wed, 23 Sep 2009 17:44:08 +0000 (17:44 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Wed, 23 Sep 2009 17:44:08 +0000 (17:44 +0000)
SVN-Revision: 17695

target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h
target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_mdio.c

index 8f966e1fda350ec465c13ba2f4a6af6d1ba29490..f4ae0eb1788828d0ed31625e79730dc14cf83e7d 100644 (file)
@@ -38,7 +38,7 @@
 #define ETH_FCS_LEN    4
 
 #define AG71XX_DRV_NAME                "ag71xx"
-#define AG71XX_DRV_VERSION     "0.5.24"
+#define AG71XX_DRV_VERSION     "0.5.25"
 
 #define AG71XX_NAPI_WEIGHT     64
 #define AG71XX_OOM_REFILL      (1 + HZ/10)
index 57212788950cff83587b50824fdc55c60ad70e3a..72f732d54fb2d79e9731ebed81bb93b69c570e04 100644 (file)
@@ -21,7 +21,13 @@ struct ag71xx_mdio *ag71xx_mdio_bus;
 static inline void ag71xx_mdio_wr(struct ag71xx_mdio *am, unsigned reg,
                                  u32 value)
 {
-       __raw_writel(value, am->mdio_base + reg);
+       void __iomem *r;
+
+       r = am->mdio_base + reg;
+       __raw_writel(value, r);
+
+       /* flush write */
+       (void) __raw_readl(r);
 }
 
 static inline u32 ag71xx_mdio_rr(struct ag71xx_mdio *am, unsigned reg)