Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Sep 2017 16:52:59 +0000 (UTC)
From:      Scott Long <scottl@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r323317 - head/sys/dev/aac
Message-ID:  <201709081652.v88GqxZE029385@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: scottl
Date: Fri Sep  8 16:52:59 2017
New Revision: 323317
URL: https://svnweb.freebsd.org/changeset/base/323317

Log:
  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:
  head/sys/dev/aac/aac.c

Modified: head/sys/dev/aac/aac.c
==============================================================================
--- head/sys/dev/aac/aac.c	Fri Sep  8 15:44:52 2017	(r323316)
+++ head/sys/dev/aac/aac.c	Fri Sep  8 16:52:59 2017	(r323317)
@@ -418,9 +418,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);
 
@@ -437,12 +434,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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201709081652.v88GqxZE029385>