From owner-svn-src-head@freebsd.org Tue Jan 17 00:39:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CC08CB3C46; Tue, 17 Jan 2017 00:39:10 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ED5B1A0E; Tue, 17 Jan 2017 00:39:10 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0H0d9rT042502; Tue, 17 Jan 2017 00:39:09 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0H0d9PA042501; Tue, 17 Jan 2017 00:39:09 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201701170039.v0H0d9PA042501@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Tue, 17 Jan 2017 00:39:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312316 - head/sys/arm/xilinx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jan 2017 00:39:10 -0000 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 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)