This commit allows each TXQ to be picked in a round-robin fashion by
the PPv2 transmit scheduling mechanism. This is opposed to the default
behaviour that prioritizes the highest numbered queues.
Suggested-by: Yan Markman <ymarkman@marvell.com>
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
 #define     MVPP2_TXP_SCHED_ENQ_MASK           0xff
 #define     MVPP2_TXP_SCHED_DISQ_OFFSET                8
 #define MVPP2_TXP_SCHED_CMD_1_REG              0x8010
+#define MVPP2_TXP_SCHED_FIXED_PRIO_REG         0x8014
 #define MVPP2_TXP_SCHED_PERIOD_REG             0x8018
 #define MVPP2_TXP_SCHED_MTU_REG                        0x801c
 #define     MVPP2_TXP_MTU_MAX                  0x7FFFF
 
                    tx_port_num);
        mvpp2_write(port->priv, MVPP2_TXP_SCHED_CMD_1_REG, 0);
 
+       /* Set TXQ scheduling to Round-Robin */
+       mvpp2_write(port->priv, MVPP2_TXP_SCHED_FIXED_PRIO_REG, 0);
+
        /* Close bandwidth for all queues */
        for (queue = 0; queue < MVPP2_MAX_TXQ; queue++) {
                ptxq = mvpp2_txq_phys(port->id, queue);