diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2020-06-26 21:02:37 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2020-06-26 21:02:37 +0000 |
commit | 32e456323c6942bdbbf55b030d65bd670404b42f (patch) | |
tree | 0cb5307b0e7978f3bea2cdfe3760e04ba130e3b3 /sys | |
parent | de8ef45f008c333c5dcbcef14068e7ef313c9892 (diff) |
MVPP2_TXQ_SCHED_TOKEN_CNTR_REG() expects the logical queue id.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/fdt/if_mvpp.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/dev/fdt/if_mvpp.c b/sys/dev/fdt/if_mvpp.c index e1697238155..cf3083f4fb7 100644 --- a/sys/dev/fdt/if_mvpp.c +++ b/sys/dev/fdt/if_mvpp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mvpp.c,v 1.6 2020/06/26 09:49:51 patrick Exp $ */ +/* $OpenBSD: if_mvpp.c,v 1.7 2020/06/26 21:02:36 patrick Exp $ */ /* * Copyright (c) 2008, 2019 Mark Kettenis <kettenis@openbsd.org> * Copyright (c) 2017, 2020 Patrick Wildt <patrick@blueri.se> @@ -2585,7 +2585,7 @@ mvpp2_txq_hw_deinit(struct mvpp2_port *sc, struct mvpp2_tx_queue *txq) reg &= ~MVPP2_TXQ_DRAIN_EN_MASK; mvpp2_write(sc->sc, MVPP2_TXQ_PREF_BUF_REG, reg); - mvpp2_write(sc->sc, MVPP2_TXQ_SCHED_TOKEN_CNTR_REG(txq->id), 0); + mvpp2_write(sc->sc, MVPP2_TXQ_SCHED_TOKEN_CNTR_REG(txq->log_id), 0); mvpp2_write(sc->sc, MVPP2_TXQ_NUM_REG, txq->id); mvpp2_write(sc->sc, MVPP2_TXQ_DESC_ADDR_REG, 0); mvpp2_write(sc->sc, MVPP2_TXQ_DESC_SIZE_REG, 0); @@ -2766,16 +2766,14 @@ mvpp2_txq_phys(int port, int txq) void mvpp2_defaults_set(struct mvpp2_port *port) { - int val, queue, p_txq; + int val, queue; mvpp2_write(port->sc, MVPP2_TXP_SCHED_PORT_INDEX_REG, mvpp2_egress_port(port)); mvpp2_write(port->sc, MVPP2_TXP_SCHED_CMD_1_REG, 0); - for (queue = 0; queue < MVPP2_MAX_TXQ; queue++) { - p_txq = mvpp2_txq_phys(port->sc_id, queue); - mvpp2_write(port->sc, MVPP2_TXQ_SCHED_TOKEN_CNTR_REG(p_txq), 0); - } + for (queue = 0; queue < MVPP2_MAX_TXQ; queue++) + mvpp2_write(port->sc, MVPP2_TXQ_SCHED_TOKEN_CNTR_REG(queue), 0); mvpp2_write(port->sc, MVPP2_TXP_SCHED_PERIOD_REG, port->sc->sc_tclk / (1000 * 1000)); |