aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/macb.c
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@csr.com>2009-02-02 17:52:39 +0000
committerDavid Vrabel <david.vrabel@csr.com>2009-02-02 17:52:39 +0000
commit8f04915532485d81e7f6c580a396ea7b01094221 (patch)
treec5740e961a025f2fb6b520a2bc5937f19d4345ab /drivers/net/macb.c
parent8f5140a6a0b1a9aa79585b0008e88c5d266c5c1d (diff)
parent45c82b5a770be66845687a7d027c8b52946d59af (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-upstream
Diffstat (limited to 'drivers/net/macb.c')
-rw-r--r--drivers/net/macb.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index a04da4ecaa8..f6c4936e2fa 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -321,6 +321,10 @@ static void macb_tx(struct macb *bp)
printk(KERN_ERR "%s: TX underrun, resetting buffers\n",
bp->dev->name);
+ /* Transfer ongoing, disable transmitter, to avoid confusion */
+ if (status & MACB_BIT(TGO))
+ macb_writel(bp, NCR, macb_readl(bp, NCR) & ~MACB_BIT(TE));
+
head = bp->tx_head;
/*Mark all the buffer as used to avoid sending a lost buffer*/
@@ -343,6 +347,10 @@ static void macb_tx(struct macb *bp)
}
bp->tx_head = bp->tx_tail = 0;
+
+ /* Enable the transmitter again */
+ if (status & MACB_BIT(TGO))
+ macb_writel(bp, NCR, macb_readl(bp, NCR) | MACB_BIT(TE));
}
if (!(status & MACB_BIT(COMP)))