From owner-p4-projects@FreeBSD.ORG Wed Nov 29 08:46:09 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 65CC016A47E; Wed, 29 Nov 2006 08:46:09 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 27F0C16A407 for ; Wed, 29 Nov 2006 08:46:09 +0000 (UTC) (envelope-from scottl@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id AD72143CAA for ; Wed, 29 Nov 2006 08:46:06 +0000 (GMT) (envelope-from scottl@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAT8k76L041723 for ; Wed, 29 Nov 2006 08:46:07 GMT (envelope-from scottl@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAT8k6aT041720 for perforce@freebsd.org; Wed, 29 Nov 2006 08:46:06 GMT (envelope-from scottl@freebsd.org) Date: Wed, 29 Nov 2006 08:46:06 GMT Message-Id: <200611290846.kAT8k6aT041720@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to scottl@freebsd.org using -f From: Scott Long To: Perforce Change Reviews Cc: Subject: PERFORCE change 110668 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Nov 2006 08:46:09 -0000 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; /*