diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2020-08-22 12:31:49 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2020-08-22 12:31:49 +0000 |
commit | fbaa9ab8d2cbbe13bde2ac2783915be618b82af1 (patch) | |
tree | 79f443bc63f174ecc492d41976b6f230cdc74710 /sys | |
parent | 356b66ef13ac9e8f709473510206e1b4e08f1180 (diff) |
Correct oversize rxq initialization in the classifier.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/fdt/if_mvpp.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/fdt/if_mvpp.c b/sys/dev/fdt/if_mvpp.c index d15468c69f9..fadd5f32a51 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.25 2020/08/22 12:29:44 patrick Exp $ */ +/* $OpenBSD: if_mvpp.c,v 1.26 2020/08/22 12:31:48 patrick Exp $ */ /* * Copyright (c) 2008, 2019 Mark Kettenis <kettenis@openbsd.org> * Copyright (c) 2017, 2020 Patrick Wildt <patrick@blueri.se> @@ -4365,6 +4365,13 @@ mvpp2_cls_port_config(struct mvpp2_port *port) void mvpp2_cls_oversize_rxq_set(struct mvpp2_port *port) { + uint32_t val; + mvpp2_write(port->sc, MVPP2_CLS_OVERSIZE_RXQ_LOW_REG(port->sc_id), (port->sc_id * 32) & MVPP2_CLS_OVERSIZE_RXQ_LOW_MASK); + mvpp2_write(port->sc, MVPP2_CLS_SWFWD_P2HQ_REG(port->sc_id), + (port->sc_id * 32) >> MVPP2_CLS_OVERSIZE_RXQ_LOW_BITS); + val = mvpp2_read(port->sc, MVPP2_CLS_SWFWD_PCTRL_REG); + val &= ~MVPP2_CLS_SWFWD_PCTRL_MASK(port->sc_id); + mvpp2_write(port->sc, MVPP2_CLS_SWFWD_PCTRL_REG, val); } |