aboutsummaryrefslogtreecommitdiff
path: root/sys/arm
diff options
context:
space:
mode:
authorOleksandr Tymoshenko <gonzo@FreeBSD.org>2017-01-17 00:39:09 +0000
committerOleksandr Tymoshenko <gonzo@FreeBSD.org>2017-01-17 00:39:09 +0000
commit024fe4e7ea91260481ef3da7b478b23eb05622a4 (patch)
tree4d953f7c96ac8926d62495e3565ed5b496b7da26 /sys/arm
parent09606165a0ab82291c6443d5c82b205256c56458 (diff)
downloadsrc-024fe4e7ea91260481ef3da7b478b23eb05622a4.tar.gz
src-024fe4e7ea91260481ef3da7b478b23eb05622a4.zip
[zynq] Fix panic on USB PHY initialization failure
The Zedboard has a hardware bug where initialization of the USB PHY occasionally fails on boot-up. Fix regression in -CURRENT when kernel panics on such occasion. 11-RELEASE branch works fine PR: 215862 Submitted by: Thomas Skibo <thoma555-bsd@yahoo.com>
Notes
Notes: svn path=/head/; revision=312316
Diffstat (limited to 'sys/arm')
-rw-r--r--sys/arm/xilinx/zy7_ehci.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/arm/xilinx/zy7_ehci.c b/sys/arm/xilinx/zy7_ehci.c
index f6e34f774491..0b7a3ffd22e9 100644
--- a/sys/arm/xilinx/zy7_ehci.c
+++ b/sys/arm/xilinx/zy7_ehci.c
@@ -325,13 +325,10 @@ zy7_ehci_detach(device_t dev)
/* during module unload there are lots of children leftover */
device_delete_children(dev);
- sc->sc_flags &= ~EHCI_SCFLG_DONEINIT;
-
- if (sc->sc_irq_res && sc->sc_intr_hdl)
- /* call ehci_detach() after ehci_init() called after
- * successful bus_setup_intr().
- */
+ if ((sc->sc_flags & EHCI_SCFLG_DONEINIT) != 0) {
ehci_detach(sc);
+ sc->sc_flags &= ~EHCI_SCFLG_DONEINIT;
+ }
if (sc->sc_irq_res) {
if (sc->sc_intr_hdl != NULL)