summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2020-11-13 22:46:21 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2020-11-13 22:46:21 +0000
commitf1c04c42e12ae0d70c5d0a5137940caf985f439c (patch)
tree4faaeee6ab1787ce4fbaffc7152d5383423449d8 /sys
parent7bddf27c513b1075c430e6559426b53c8edab947 (diff)
Assert reset before configuring the MACs. Otherwise we leave the 10G MAC
in reset which prevents it from working. ok patrick@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/fdt/if_mvpp.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/dev/fdt/if_mvpp.c b/sys/dev/fdt/if_mvpp.c
index 1b50d212c0e..2fc4a781148 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.39 2020/11/12 13:53:41 kettenis Exp $ */
+/* $OpenBSD: if_mvpp.c,v 1.40 2020/11/13 22:46:20 kettenis Exp $ */
/*
* Copyright (c) 2008, 2019 Mark Kettenis <kettenis@openbsd.org>
* Copyright (c) 2017, 2020 Patrick Wildt <patrick@blueri.se>
@@ -2491,9 +2491,9 @@ mvpp2_mac_config(struct mvpp2_port *sc)
mvpp2_port_disable(sc);
- mvpp2_gmac_write(sc, MVPP2_PORT_CTRL2_REG,
- mvpp2_gmac_read(sc, MVPP2_PORT_CTRL2_REG) |
- MVPP2_PORT_CTRL2_PORTMACRESET);
+ mvpp2_mac_reset_assert(sc);
+ mvpp2_pcs_reset_assert(sc);
+
mvpp2_gop_intr_mask(sc);
mvpp2_comphy_config(sc, 0);
@@ -2503,9 +2503,6 @@ mvpp2_mac_config(struct mvpp2_port *sc)
else
mvpp2_gmac_config(sc);
- mvpp2_mac_reset_assert(sc);
- mvpp2_pcs_reset_assert(sc);
-
mvpp2_comphy_config(sc, 1);
mvpp2_gop_config(sc);