From owner-p4-projects@FreeBSD.ORG Wed Oct 14 11:21:27 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 43898106568D; Wed, 14 Oct 2009 11:21:27 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0789D106566B for ; Wed, 14 Oct 2009 11:21:27 +0000 (UTC) (envelope-from mav@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E9BBE8FC1D for ; Wed, 14 Oct 2009 11:21:26 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n9EBLQxA010577 for ; Wed, 14 Oct 2009 11:21:26 GMT (envelope-from mav@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n9EBLQFW010575 for perforce@freebsd.org; Wed, 14 Oct 2009 11:21:26 GMT (envelope-from mav@freebsd.org) Date: Wed, 14 Oct 2009 11:21:26 GMT Message-Id: <200910141121.n9EBLQFW010575@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mav@freebsd.org using -f From: Alexander Motin To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 169485 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2009 11:21:27 -0000 http://p4web.freebsd.org/chv.cgi?CH=169485 Change 169485 by mav@mav_mavbook on 2009/10/14 11:20:29 No need to lock PMP, just reference it. We can't lock it in async handler, as it may try to sleep. Affected files ... .. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_pmp.c#7 edit Differences ... ==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_pmp.c#7 (text+ko) ==== @@ -252,7 +252,7 @@ if (code == AC_SENT_BDR || code == AC_BUS_RESET) softc->found = 0; /* We have to reset everything. */ softc->state = PMP_STATE_PORTS; - (void)cam_periph_hold(periph, PRIBIO); + cam_periph_acquire(periph); xpt_schedule(periph, CAM_PRIORITY_BUS); break; default: @@ -348,7 +348,7 @@ * to finish the probe. The reference will be dropped in pmpdone at * the end of probe. */ - (void)cam_periph_hold(periph, PRIBIO); + (void)cam_periph_acquire(periph); xpt_schedule(periph, CAM_PRIORITY_BUS); return(CAM_REQ_CMP); @@ -682,7 +682,7 @@ break; } softc->state = PMP_STATE_NORMAL; - cam_periph_unhold(periph); + cam_periph_release_locked(periph); } #endif /* _KERNEL */