From c09228f0837ac811e86ebac3dcc19c3c792014e3 Mon Sep 17 00:00:00 2001 From: juhosg Date: Wed, 23 Sep 2009 17:44:08 +0000 Subject: ar71xx: flush mii register writes git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17695 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h | 2 +- target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_mdio.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h index 8f966e1fd..f4ae0eb17 100644 --- a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h +++ b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h @@ -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) diff --git a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_mdio.c b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_mdio.c index 572127889..72f732d54 100644 --- a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_mdio.c +++ b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_mdio.c @@ -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) -- cgit v1.2.3