From owner-svn-src-stable@freebsd.org Fri Jan 19 16:06:53 2018 Return-Path: Delivered-To: svn-src-stable@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 2F6A7EBA20A; Fri, 19 Jan 2018 16:06:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0A51B3BF9; Fri, 19 Jan 2018 16:06:53 +0000 (UTC) (envelope-from mav@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 589267A23; Fri, 19 Jan 2018 16:06:52 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0JG6qjk079941; Fri, 19 Jan 2018 16:06:52 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0JG6q6x079940; Fri, 19 Jan 2018 16:06:52 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201801191606.w0JG6q6x079940@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 19 Jan 2018 16:06:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r328167 - stable/11/sys/dev/aac X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/dev/aac X-SVN-Commit-Revision: 328167 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jan 2018 16:06:53 -0000 Author: mav Date: Fri Jan 19 16:06:52 2018 New Revision: 328167 URL: https://svnweb.freebsd.org/changeset/base/328167 Log: MFC r323317 (by scottl): Move the intrhook release to later in the function so that GEOM knows to wait longer for possible root devices to come online. This fixes a race that seems to be triggered by EARLY_AP_STARTUP. Submitted by: cgull@glup.org Modified: stable/11/sys/dev/aac/aac.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/aac/aac.c ============================================================================== --- stable/11/sys/dev/aac/aac.c Fri Jan 19 15:42:34 2018 (r328166) +++ stable/11/sys/dev/aac/aac.c Fri Jan 19 16:06:52 2018 (r328167) @@ -419,9 +419,6 @@ aac_startup(void *arg) sc = (struct aac_softc *)arg; fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - /* disconnect ourselves from the intrhook chain */ - config_intrhook_disestablish(&sc->aac_ich); - mtx_lock(&sc->aac_io_lock); aac_alloc_sync_fib(sc, &fib); @@ -438,12 +435,15 @@ aac_startup(void *arg) aac_release_sync_fib(sc); mtx_unlock(&sc->aac_io_lock); + /* mark the controller up */ + sc->aac_state &= ~AAC_STATE_SUSPEND; + /* poke the bus to actually attach the child devices */ if (bus_generic_attach(sc->aac_dev)) device_printf(sc->aac_dev, "bus_generic_attach failed\n"); - /* mark the controller up */ - sc->aac_state &= ~AAC_STATE_SUSPEND; + /* disconnect ourselves from the intrhook chain */ + config_intrhook_disestablish(&sc->aac_ich); /* enable interrupts now */ AAC_UNMASK_INTERRUPTS(sc);