summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/fdt/if_mvpp.c6
-rw-r--r--sys/dev/fdt/if_mvppreg.h6
2 files changed, 10 insertions, 2 deletions
diff --git a/sys/dev/fdt/if_mvpp.c b/sys/dev/fdt/if_mvpp.c
index 3b84c1feeac..909b9685139 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.27 2020/08/22 12:34:14 patrick Exp $ */
+/* $OpenBSD: if_mvpp.c,v 1.28 2020/11/03 21:46:14 patrick Exp $ */
/*
* Copyright (c) 2008, 2019 Mark Kettenis <kettenis@openbsd.org>
* Copyright (c) 2017, 2020 Patrick Wildt <patrick@blueri.se>
@@ -487,6 +487,10 @@ mvpp2_attach_deferred(struct device *self)
mvpp2_axi_config(sc);
+ bus_space_write_4(sc->sc_iot, sc->sc_ioh_iface, MVPP22_SMI_MISC_CFG_REG,
+ bus_space_read_4(sc->sc_iot, sc->sc_ioh_iface,
+ MVPP22_SMI_MISC_CFG_REG) & ~MVPP22_SMI_POLLING_EN);
+
sc->sc_aggr_ntxq = 1;
sc->sc_aggr_txqs = mallocarray(sc->sc_aggr_ntxq,
sizeof(*sc->sc_aggr_txqs), M_DEVBUF, M_WAITOK | M_ZERO);
diff --git a/sys/dev/fdt/if_mvppreg.h b/sys/dev/fdt/if_mvppreg.h
index 134e898d014..c5fc41cabb1 100644
--- a/sys/dev/fdt/if_mvppreg.h
+++ b/sys/dev/fdt/if_mvppreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_mvppreg.h,v 1.13 2020/08/22 12:34:14 patrick Exp $ */
+/* $OpenBSD: if_mvppreg.h,v 1.14 2020/11/03 21:46:14 patrick Exp $ */
/*
* Copyright (c) 2008, 2019 Mark Kettenis <kettenis@openbsd.org>
* Copyright (c) 2017, 2020 Patrick Wildt <patrick@blueri.se>
@@ -566,6 +566,10 @@
#define MVPP2_PORT_CTRL4_MARVELL_HEADER_EN BIT(9)
#define MVPP2_PORT_CTRL4_LEDS_NUMBER BIT(10)
+/* SMI registers */
+#define MVPP22_SMI_MISC_CFG_REG 0x1204
+#define MVPP22_SMI_POLLING_EN BIT(10)
+
#define MVPP2_CAUSE_TXQ_SENT_DESC_ALL_MASK 0xff
/* MPCS registers */