blob: 30445e9c4a2a1a383f97859d6525a19cb3a08dfa [file] [log] [blame]
--- drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -1045,22 +1075,12 @@
last_c_index &= (num_tx_bds - 1);
}
- if (ring->free_bds > (MAX_SKB_FRAGS + 1)
- && netif_tx_queue_stopped(txq)) {
- if (ring->index == DESC_INDEX) {
- /* Disable txdma bdone/pdone interrupt if we have
- * free tx bds
- */
- bcmgenet_intrl2_0_writel(priv,
- UMAC_IRQ_TXDMA_BDONE | UMAC_IRQ_TXDMA_PDONE,
- INTRL2_CPU_MASK_SET);
- } else {
- bcmgenet_intrl2_1_writel(priv, (1 << ring->index),
- INTRL2_CPU_MASK_SET);
- priv->int1_mask |= (1 << ring->index);
- }
+ if (ring->free_bds > (MAX_SKB_FRAGS + 1))
+ ring->int_disable(priv, ring);
+
+ if (netif_tx_queue_stopped(txq))
netif_tx_wake_queue(txq);
- }
+
ring->c_index = c_index;
}
@@ -1325,16 +1345,7 @@
if (ring->free_bds <= (MAX_SKB_FRAGS + 1)) {
netif_tx_stop_queue(txq);
- if (index == DESC_INDEX)
- bcmgenet_intrl2_0_writel(priv,
- UMAC_IRQ_TXDMA_BDONE |
- UMAC_IRQ_TXDMA_PDONE,
- INTRL2_CPU_MASK_CLEAR);
- else {
- bcmgenet_intrl2_1_writel(priv, (1 << index),
- INTRL2_CPU_MASK_CLEAR);
- priv->int1_mask &= ~(1 << index);
- }
+ ring->int_enable(priv, ring);
}
out: