Date: Wed, 29 Nov 2006 08:46:06 GMT From: Scott Long <scottl@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 110668 for review Message-ID: <200611290846.kAT8k6aT041720@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=110668 Change 110668 by scottl@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; /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200611290846.kAT8k6aT041720>