aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2009-11-29 13:38:03 +0000
committerFelix Fietkau <nbd@openwrt.org>2009-11-29 13:38:03 +0000
commitcb85dcb1a8fd1c63e680b3fa0a768b017081af20 (patch)
tree89a41f14661e76e0dab4201013b3b80b030bf3e4 /target
parent896090973fb7d9036d8e9750ad48109469c8c9f4 (diff)
downloadupstream-cb85dcb1a8fd1c63e680b3fa0a768b017081af20.tar.gz
upstream-cb85dcb1a8fd1c63e680b3fa0a768b017081af20.tar.bz2
upstream-cb85dcb1a8fd1c63e680b3fa0a768b017081af20.zip
ar71xx: mask out reserved bits from the dma tx status in the ethernet driver
SVN-Revision: 18599
Diffstat (limited to 'target')
-rw-r--r--target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c
index 57f6b34d6b..94420477c1 100644
--- a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c
+++ b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c
@@ -318,6 +318,7 @@ static void ag71xx_hw_set_macaddr(struct ag71xx *ag, unsigned char *mac)
static void ag71xx_dma_reset(struct ag71xx *ag)
{
+ u32 val;
int i;
ag71xx_dump_dma_regs(ag);
@@ -340,13 +341,19 @@ static void ag71xx_dma_reset(struct ag71xx *ag)
ag71xx_wr(ag, AG71XX_REG_RX_STATUS, RX_STATUS_BE | RX_STATUS_OF);
ag71xx_wr(ag, AG71XX_REG_TX_STATUS, TX_STATUS_BE | TX_STATUS_UR);
- if (ag71xx_rr(ag, AG71XX_REG_RX_STATUS))
- printk(KERN_ALERT "%s: unable to clear DMA Rx status\n",
- ag->dev->name);
+ val = ag71xx_rr(ag, AG71XX_REG_RX_STATUS);
+ if (val)
+ printk(KERN_ALERT "%s: unable to clear DMA Rx status: %08x\n",
+ ag->dev->name, val);
- if (ag71xx_rr(ag, AG71XX_REG_TX_STATUS))
- printk(KERN_ALERT "%s: unable to clear DMA Tx status\n",
- ag->dev->name);
+ val = ag71xx_rr(ag, AG71XX_REG_TX_STATUS);
+
+ /* mask out reserved bits */
+ val &= ~0xff000000;
+
+ if (val)
+ printk(KERN_ALERT "%s: unable to clear DMA Tx status: %08x\n",
+ ag->dev->name, val);
ag71xx_dump_dma_regs(ag);
}