From owner-freebsd-current@FreeBSD.ORG Wed Jun 11 14:33:56 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DE83037B401; Wed, 11 Jun 2003 14:33:56 -0700 (PDT) Received: from aslan.scsiguy.com (mail.scsiguy.com [63.229.232.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id BFBBD43F93; Wed, 11 Jun 2003 14:33:55 -0700 (PDT) (envelope-from gibbs@scsiguy.com) Received: from localhost (aslan.scsiguy.com [63.229.232.106]) by aslan.scsiguy.com (8.12.9/8.12.8) with ESMTP id h5BLW5vl005175; Wed, 11 Jun 2003 15:32:05 -0600 (MDT) (envelope-from gibbs@scsiguy.com) Date: Wed, 11 Jun 2003 15:32:05 -0600 From: "Justin T. Gibbs" To: "M. Warner Losh" , gurney_j@resnet.uoregon.edu, gurney_j@efn.org Message-ID: <361340000.1055367125@caspian.scsiguy.com> In-Reply-To: <20030609.224621.71095461.imp@bsdimp.com> References: <20030609165838.32044@hydrogen.funkthat.com> <20030610022706.GI509@cicely12.cicely.de> <20030609210919.33379@hydrogen.funkthat.com> <20030609.224621.71095461.imp@bsdimp.com> X-Mailer: Mulberry/3.0.3 (Linux/x86) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline cc: freebsd-current@freebsd.org cc: ticso@cicely.de cc: freebsd-sparc64@freebsd.org Subject: Re: PCI bus numbering and orphaned devices X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: "Justin T. Gibbs" List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jun 2003 21:33:57 -0000 > I'm thinking that the loop should be more like: > > pcifunchigh = 0; > f = 0; > hdrtype = REG(PCIR_HEADERTYPE, 1); > if (hdrtype & 0x7f > 2) > continue; My only complaint about this is that if no device is present in the slot, won't you just get all bits set in whatever you read? If so, the headertype check should be better bounded. -- Justin