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: cg...@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);
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to