PERFORCE change 110668 for review
Scott Long
scottl at FreeBSD.org
Wed Nov 29 00:46:09 PST 2006
http://perforce.freebsd.org/chv.cgi?CH=110668
Change 110668 by scottl at scottl-x64 on 2006/11/29 08:45:28
Drop the sim lock while calling into other OS layers that might
sleep. This isn't a great solution, but works for now.
Affected files ...
.. //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_da.c#18 edit
.. //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_pass.c#15 edit
Differences ...
==== //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_da.c#18 (text+ko) ====
@@ -1184,6 +1184,7 @@
* Register this media as a disk
*/
+ mtx_unlock(periph->sim->mtx);
softc->disk = disk_alloc();
softc->disk->d_open = daopen;
softc->disk->d_close = daclose;
@@ -1195,6 +1196,7 @@
softc->disk->d_unit = periph->unit_number;
softc->disk->d_flags = 0;
disk_create(softc->disk, DISK_VERSION);
+ mtx_lock(periph->sim->mtx);
/*
* Add async callbacks for bus reset and
==== //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_pass.c#15 (text+ko) ====
@@ -298,9 +298,11 @@
DEVSTAT_PRIORITY_PASS);
/* Register the device */
+ mtx_unlock(periph->sim->mtx);
softc->dev = make_dev(&pass_cdevsw, unit2minor(periph->unit_number),
UID_ROOT, GID_OPERATOR, 0600, "%s%d",
periph->periph_name, periph->unit_number);
+ mtx_lock(periph->sim->mtx);
softc->dev->si_drv1 = periph;
/*
More information about the p4-projects
mailing list