From owner-p4-projects@FreeBSD.ORG Thu Aug 16 19:57:19 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AB1C516A469; Thu, 16 Aug 2007 19:57:19 +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 4090616A418 for ; Thu, 16 Aug 2007 19:57:19 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.freebsd.org (Postfix) with ESMTP id E6CF813C442 for ; Thu, 16 Aug 2007 19:57:18 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.8k) with ESMTP id 203710589-1834499 for multiple; Thu, 16 Aug 2007 15:57:18 -0400 Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id l7GJuuiW048042; Thu, 16 Aug 2007 15:57:05 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Christopher Davis Date: Thu, 16 Aug 2007 14:36:52 -0400 User-Agent: KMail/1.9.6 References: <200707270543.l6R5hd4T033226@repoman.freebsd.org> In-Reply-To: <200707270543.l6R5hd4T033226@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200708161436.52368.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Thu, 16 Aug 2007 15:57:05 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/3967/Thu Aug 16 11:32:14 2007 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Perforce Change Reviews Subject: Re: PERFORCE change 124155 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: Thu, 16 Aug 2007 19:57:20 -0000 On Friday 27 July 2007 01:43:39 am Christopher Davis wrote: > http://perforce.freebsd.org/chv.cgi?CH=124155 > > Change 124155 by loafier@chrisdsoc on 2007/07/27 05:43:02 > > Use return value from pci_enable_io() to help determine whether to > allocate memory or io ports. No. Drivers should not call this as you could enable decoding on BARs that aren't programmed yet. Generally as a device driver writer you should know what the BARs on your system are. Otherwise, you can read the BAR and test it like so: if (PCI_BAR_IO(pci_read_config(dev, PCIR_BAR(x), 4)) { It's I/O } else { It's memory } -- John Baldwin