aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2010-01-30 15:26:02 +0000
committerGabor Juhos <juhosg@openwrt.org>2010-01-30 15:26:02 +0000
commitbf61c26b5feffd4fdd3825710de286f99dc7980b (patch)
tree41605484c552b81121afa78c3780b3b4336145d7
parent8f1e2c9fdcd326a2aeadc65badbfea17d80d77d9 (diff)
downloadupstream-bf61c26b5feffd4fdd3825710de286f99dc7980b.tar.gz
upstream-bf61c26b5feffd4fdd3825710de286f99dc7980b.tar.bz2
upstream-bf61c26b5feffd4fdd3825710de286f99dc7980b.zip
ramips_eth: fix invalid register writes
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19417 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--target/linux/ramips/files/drivers/net/ramips.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/target/linux/ramips/files/drivers/net/ramips.c b/target/linux/ramips/files/drivers/net/ramips.c
index c3cc029b9f..c9a0c9ea3b 100644
--- a/target/linux/ramips/files/drivers/net/ramips.c
+++ b/target/linux/ramips/files/drivers/net/ramips.c
@@ -270,8 +270,8 @@ ramips_eth_set_mac_addr(struct net_device *dev, void *priv)
memcpy(dev->dev_addr, ((struct sockaddr*)priv)->sa_data, dev->addr_len);
ramips_fe_wr((mac[0] << 8) | mac[1], RAMIPS_GDMA1_MAC_ADRH);
- ramips_fe_wr(RAMIPS_GDMA1_MAC_ADRL,
- (mac[2] << 24) | (mac[3] << 16) | (mac[4] << 8) | mac[5]);
+ ramips_fe_wr((mac[2] << 24) | (mac[3] << 16) | (mac[4] << 8) | mac[5],
+ RAMIPS_GDMA1_MAC_ADRL);
return 0;
}
@@ -357,8 +357,9 @@ ramips_eth_stop(struct net_device *dev)
{
struct raeth_priv *priv = netdev_priv(dev);
- ramips_fe_wr(RAMIPS_PDMA_GLO_CFG, ramips_fe_rr(RAMIPS_PDMA_GLO_CFG) &
- ~(RAMIPS_TX_WB_DDONE | RAMIPS_RX_DMA_EN | RAMIPS_TX_DMA_EN));
+ ramips_fe_wr(ramips_fe_rr(RAMIPS_PDMA_GLO_CFG) &
+ ~(RAMIPS_TX_WB_DDONE | RAMIPS_RX_DMA_EN | RAMIPS_TX_DMA_EN),
+ RAMIPS_PDMA_GLO_CFG);
free_irq(dev->irq, dev);
netif_stop_queue(dev);
tasklet_kill(&priv->tx_housekeeping_tasklet);