aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/cadence/macb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/cadence/macb.c')
-rw-r--r--drivers/net/ethernet/cadence/macb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
index 0e489bb82456..538544a7c642 100644
--- a/drivers/net/ethernet/cadence/macb.c
+++ b/drivers/net/ethernet/cadence/macb.c
@@ -991,6 +991,7 @@ static inline void macb_init_rx_ring(struct macb *bp)
991 addr += bp->rx_buffer_size; 991 addr += bp->rx_buffer_size;
992 } 992 }
993 bp->rx_ring[bp->rx_ring_size - 1].addr |= MACB_BIT(RX_WRAP); 993 bp->rx_ring[bp->rx_ring_size - 1].addr |= MACB_BIT(RX_WRAP);
994 bp->rx_tail = 0;
994} 995}
995 996
996static int macb_rx(struct macb *bp, int budget) 997static int macb_rx(struct macb *bp, int budget)
@@ -1172,6 +1173,7 @@ static irqreturn_t macb_interrupt(int irq, void *dev_id)
1172 if (status & MACB_BIT(RXUBR)) { 1173 if (status & MACB_BIT(RXUBR)) {
1173 ctrl = macb_readl(bp, NCR); 1174 ctrl = macb_readl(bp, NCR);
1174 macb_writel(bp, NCR, ctrl & ~MACB_BIT(RE)); 1175 macb_writel(bp, NCR, ctrl & ~MACB_BIT(RE));
1176 wmb();
1175 macb_writel(bp, NCR, ctrl | MACB_BIT(RE)); 1177 macb_writel(bp, NCR, ctrl | MACB_BIT(RE));
1176 1178
1177 if (bp->caps & MACB_CAPS_ISR_CLEAR_ON_WRITE) 1179 if (bp->caps & MACB_CAPS_ISR_CLEAR_ON_WRITE)
@@ -1736,8 +1738,6 @@ static void macb_init_rings(struct macb *bp)
1736 bp->queues[0].tx_head = 0; 1738 bp->queues[0].tx_head = 0;
1737 bp->queues[0].tx_tail = 0; 1739 bp->queues[0].tx_tail = 0;
1738 bp->queues[0].tx_ring[bp->tx_ring_size - 1].ctrl |= MACB_BIT(TX_WRAP); 1740 bp->queues[0].tx_ring[bp->tx_ring_size - 1].ctrl |= MACB_BIT(TX_WRAP);
1739
1740 bp->rx_tail = 0;
1741} 1741}
1742 1742
1743static void macb_reset_hw(struct macb *bp) 1743static void macb_reset_hw(struct macb *bp)
@@ -2943,6 +2943,7 @@ static irqreturn_t at91ether_interrupt(int irq, void *dev_id)
2943 if (intstatus & MACB_BIT(RXUBR)) { 2943 if (intstatus & MACB_BIT(RXUBR)) {
2944 ctl = macb_readl(lp, NCR); 2944 ctl = macb_readl(lp, NCR);
2945 macb_writel(lp, NCR, ctl & ~MACB_BIT(RE)); 2945 macb_writel(lp, NCR, ctl & ~MACB_BIT(RE));
2946 wmb();
2946 macb_writel(lp, NCR, ctl | MACB_BIT(RE)); 2947 macb_writel(lp, NCR, ctl | MACB_BIT(RE));
2947 } 2948 }
2948 2949