From owner-p4-projects@FreeBSD.ORG Wed Dec 9 20:39:22 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EF8541065692; Wed, 9 Dec 2009 20:39:21 +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 B41A8106568D for ; Wed, 9 Dec 2009 20:39:21 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A181B8FC24 for ; Wed, 9 Dec 2009 20:39:21 +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 nB9KdLHE053606 for ; Wed, 9 Dec 2009 20:39:21 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id nB9KdLc9053604 for perforce@freebsd.org; Wed, 9 Dec 2009 20:39:21 GMT (envelope-from jhb@freebsd.org) Date: Wed, 9 Dec 2009 20:39:21 GMT Message-Id: <200912092039.nB9KdLc9053604@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 171579 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, 09 Dec 2009 20:39:22 -0000 http://p4web.freebsd.org/chv.cgi?CH=171579 Change 171579 by jhb@jhb_jhbbsd on 2009/12/09 20:39:14 Oops, need to call bus_activate_resource() when allocating a reserved resource if RF_ACTIVE is set. Missed porting this over from the PCI bus driver. Affected files ... .. //depot/projects/multipass/sys/kern/subr_bus.c#11 edit Differences ... ==== //depot/projects/multipass/sys/kern/subr_bus.c#11 (text+ko) ==== @@ -2991,6 +2991,9 @@ if (passthrough) panic( "resource_list_reserve() should only be called for direct children"); + if (flags & RF_ACTIVE) + panic( + "resource_list_reserve() should only reserve inactive resources"); r = resource_list_alloc(rl, bus, child, type, rid, start, end, count, flags); @@ -3056,6 +3059,10 @@ if (rle->flags & RLE_RESERVED) { if (rle->flags & RLE_ALLOCATED) return (NULL); + else if ((flags & RF_ACTIVE) && + bus_activate_resource(child, type, *rid, + rle->res) != 0) + return (NULL); else return (rle->res); }