summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2019-08-11 11:16:05 +0000
committerkettenis <kettenis@openbsd.org>2019-08-11 11:16:05 +0000
commita7851cd0a7a9ce37487f8090d0db2e3f34c43610 (patch)
tree64da0357f5933fc21af67f6e852e599a88954c79
parentthe mta "certificate check" log line was not in the same format as other (diff)
downloadwireguard-openbsd-a7851cd0a7a9ce37487f8090d0db2e3f34c43610.tar.xz
wireguard-openbsd-a7851cd0a7a9ce37487f8090d0db2e3f34c43610.zip
The "phy-names" property has been dropped from the Linux device trees so
make initialization of the PHYs work without it. Simply initialize all the PHYs; there should only be one anyway. ok patrick@
-rw-r--r--sys/dev/fdt/ehci_fdt.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/sys/dev/fdt/ehci_fdt.c b/sys/dev/fdt/ehci_fdt.c
index 9a5b69ccf99..807fac3d441 100644
--- a/sys/dev/fdt/ehci_fdt.c
+++ b/sys/dev/fdt/ehci_fdt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ehci_fdt.c,v 1.5 2019/05/10 18:20:41 patrick Exp $ */
+/* $OpenBSD: ehci_fdt.c,v 1.6 2019/08/11 11:16:05 kettenis Exp $ */
/*
* Copyright (c) 2005 David Gwynne <dlg@openbsd.org>
@@ -220,11 +220,7 @@ ehci_init_phys(struct ehci_fdt_softc *sc)
{
uint32_t *phys;
uint32_t *phy;
- int len, idx;
-
- idx = OF_getindex(sc->sc_node, "usb", "phy-names");
- if (idx < 0)
- return;
+ int len;
len = OF_getproplen(sc->sc_node, "phys");
if (len <= 0)
@@ -235,15 +231,10 @@ ehci_init_phys(struct ehci_fdt_softc *sc)
phy = phys;
while (phy && phy < phys + (len / sizeof(uint32_t))) {
- if (idx == 0) {
- ehci_init_phy(sc, phy);
- free(phys, M_TEMP, len);
- return;
- }
-
+ ehci_init_phy(sc, phy);
phy = ehci_next_phy(phy);
- idx--;
}
+
free(phys, M_TEMP, len);
}