[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>
This commit is contained in:
Oleksandr Tymoshenko 2017-01-17 00:39:09 +00:00
parent 09606165a0
commit 024fe4e7ea
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=312316

View File

@ -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)