From owner-freebsd-hackers Fri Jan 12 20:35:11 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from rjlhome.sco.com (unknown [207.65.180.181]) by hub.freebsd.org (Postfix) with ESMTP id A073C37B401 for ; Fri, 12 Jan 2001 20:34:53 -0800 (PST) Received: by rjlhome.sco.com (8.9.3/SCO5) id WAA15529 for freebsd-hackers@FreeBSD.ORG; Fri, 12 Jan 2001 22:39:49 -0600 (CST) Date: Fri, 12 Jan 2001 22:39:49 -0600 From: Robert Lipe To: freebsd-hackers@FreeBSD.ORG Subject: bus_alloc_resource and RF_SHARABLE Message-ID: <20010112223949.R8978@rjlhome.sco.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello, Hackers. I'm on FreeBSD 4.1.1 and when I attempt multiple calls to bus_alloc_resource on a PCI device for the same BAR, I run afoul of code in resource_list_alloc: rle = resource_list_find(rl, type, *rid); if (!rle) return 0; /* no resource of that type/rid */ if (rle->res) panic("resource_list_alloc: resource entry is busy"); Even though I'm calling it with RF_SHARABLE, this code doesn't seem to take that into account. It finds the existing list and therefore panics. Am I doing something wrong or does this really work? Yes, I can rig things up such that there is only one bus_alloc_resource call per BAR but I'd rather not. Thanx, RJL To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message