Date: Tue, 17 Jan 2017 00:39:09 +0000 (UTC) From: Oleksandr Tymoshenko <gonzo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312316 - head/sys/arm/xilinx Message-ID: <201701170039.v0H0d9PA042501@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: gonzo Date: Tue Jan 17 00:39:09 2017 New Revision: 312316 URL: https://svnweb.freebsd.org/changeset/base/312316 Log: [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> Modified: head/sys/arm/xilinx/zy7_ehci.c Modified: head/sys/arm/xilinx/zy7_ehci.c ============================================================================== --- head/sys/arm/xilinx/zy7_ehci.c Tue Jan 17 00:35:23 2017 (r312315) +++ head/sys/arm/xilinx/zy7_ehci.c Tue Jan 17 00:39:09 2017 (r312316) @@ -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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701170039.v0H0d9PA042501>