1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-02 19:54:04 +02:00

ar71xx: mask out reserved bits from the dma tx status in the ethernet driver

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18599 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2009-11-29 13:38:03 +00:00
parent 4ae360c4fb
commit ac42d58d7c

View File

@ -318,6 +318,7 @@ static void ag71xx_hw_set_macaddr(struct ag71xx *ag, unsigned char *mac)
static void ag71xx_dma_reset(struct ag71xx *ag) static void ag71xx_dma_reset(struct ag71xx *ag)
{ {
u32 val;
int i; int i;
ag71xx_dump_dma_regs(ag); 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_RX_STATUS, RX_STATUS_BE | RX_STATUS_OF);
ag71xx_wr(ag, AG71XX_REG_TX_STATUS, TX_STATUS_BE | TX_STATUS_UR); ag71xx_wr(ag, AG71XX_REG_TX_STATUS, TX_STATUS_BE | TX_STATUS_UR);
if (ag71xx_rr(ag, AG71XX_REG_RX_STATUS)) val = ag71xx_rr(ag, AG71XX_REG_RX_STATUS);
printk(KERN_ALERT "%s: unable to clear DMA Rx status\n", if (val)
ag->dev->name); printk(KERN_ALERT "%s: unable to clear DMA Rx status: %08x\n",
ag->dev->name, val);
if (ag71xx_rr(ag, AG71XX_REG_TX_STATUS)) val = ag71xx_rr(ag, AG71XX_REG_TX_STATUS);
printk(KERN_ALERT "%s: unable to clear DMA Tx status\n",
ag->dev->name); /* 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); ag71xx_dump_dma_regs(ag);
} }