aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/cadence/macb.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2016-12-03 11:46:54 -0500
committerDavid S. Miller <davem@davemloft.net>2016-12-03 12:29:53 -0500
commit2745529ac7358fdac72e6b388da2e934bd9da82c (patch)
tree245bb05b1a18189c5a5212db914c70a636d8267a /drivers/net/ethernet/cadence/macb.c
parentab17cb1fea82b346bdecd4f2d7f0e84e80f847af (diff)
parent8dc0f265d39a3933f4c1f846c7c694f12a2ab88a (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Couple conflicts resolved here: 1) In the MACB driver, a bug fix to properly initialize the RX tail pointer properly overlapped with some changes to support variable sized rings. 2) In XGBE we had a "CONFIG_PM" --> "CONFIG_PM_SLEEP" fix overlapping with a reorganization of the driver to support ACPI, OF, as well as PCI variants of the chip. 3) In 'net' we had several probe error path bug fixes to the stmmac driver, meanwhile a lot of this code was cleaned up and reorganized in 'net-next'. 4) The cls_flower classifier obtained a helper function in 'net-next' called __fl_delete() and this overlapped with Daniel Borkamann's bug fix to use RCU for object destruction in 'net'. It also overlapped with Jiri's change to guard the rhashtable_remove_fast() call with a check against tc_skip_sw(). 5) In mlx4, a revert bug fix in 'net' overlapped with some unrelated changes in 'net-next'. 6) In geneve, a stale header pointer after pskb_expand_head() bug fix in 'net' overlapped with a large reorganization of the same code in 'net-next'. Since the 'net-next' code no longer had the bug in question, there was nothing to do other than to simply take the 'net-next' hunks. Signed-off-by: David S. Miller <davem@davemloft.net>
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