Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Oct 2009 01:58:49 GMT
From:      Scott Long <scottl@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 169116 for review
Message-ID:  <200910020158.n921wnsh031409@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=169116

Change 169116 by scottl@scottl-y1 on 2009/10/02 01:58:39

	Reduce the scope of the locking in xpt_finishconfig_func.  The locking
	is wonky because of the device iteration code that needs to grab each
	SIM lock.

Affected files ...

.. //depot/projects/firewire/sys/cam/cam_xpt.c#3 edit

Differences ...

==== //depot/projects/firewire/sys/cam/cam_xpt.c#3 (text+ko) ====

@@ -4716,7 +4716,6 @@
 	struct	periph_driver **p_drv;
 	int	i;
 
-	mtx_lock(&xsoftc.xpt_lock);
 	if (busses_to_config == 0) {
 		/* Register all the peripheral drivers */
 		/* XXX This will have to change when we have loadable modules */
@@ -4733,11 +4732,12 @@
 		xpt_for_all_devices(xptpassannouncefunc, NULL);
 
 		/* Release our hook so that the boot can continue. */
+		mtx_lock(&xsoftc.xpt_lock);
 		wakeup(xpt_config);
+		mtx_unlock(&xsoftc.xpt_lock);
 	}
 
 	free(context, M_CAMXPT);
-	mtx_unlock(&xsoftc.xpt_lock);
 }
 
 static void



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