]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/net/ethernet/freescale/gianfar.c
gianfar: Remove redundant programming of [rt]xic registers
[karo-tx-linux.git] / drivers / net / ethernet / freescale / gianfar.c
index 3f07dbd0198048980046e2956ffa0c87668a4485..e28b3e6b12d98e287ffd97fc5b90a27c88043023 100644 (file)
@@ -1821,20 +1821,9 @@ void gfar_configure_coalescing(struct gfar_private *priv,
 {
        struct gfar __iomem *regs = priv->gfargrp[0].regs;
        u32 __iomem *baddr;
-       int i = 0;
-
-       /* Backward compatible case ---- even if we enable
-        * multiple queues, there's only single reg to program
-        */
-       gfar_write(&regs->txic, 0);
-       if (likely(priv->tx_queue[0]->txcoalescing))
-               gfar_write(&regs->txic, priv->tx_queue[0]->txic);
-
-       gfar_write(&regs->rxic, 0);
-       if (unlikely(priv->rx_queue[0]->rxcoalescing))
-               gfar_write(&regs->rxic, priv->rx_queue[0]->rxic);
 
        if (priv->mode == MQ_MG_MODE) {
+               int i = 0;
                baddr = &regs->txic0;
                for_each_set_bit(i, &tx_mask, priv->num_tx_queues) {
                        gfar_write(baddr + i, 0);
@@ -1848,6 +1837,17 @@ void gfar_configure_coalescing(struct gfar_private *priv,
                        if (likely(priv->rx_queue[i]->rxcoalescing))
                                gfar_write(baddr + i, priv->rx_queue[i]->rxic);
                }
+       } else {
+               /* Backward compatible case ---- even if we enable
+                * multiple queues, there's only single reg to program
+                */
+               gfar_write(&regs->txic, 0);
+               if (likely(priv->tx_queue[0]->txcoalescing))
+                       gfar_write(&regs->txic, priv->tx_queue[0]->txic);
+
+               gfar_write(&regs->rxic, 0);
+               if (unlikely(priv->rx_queue[0]->rxcoalescing))
+                       gfar_write(&regs->rxic, priv->rx_queue[0]->rxic);
        }
 }