Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Jun 2003 15:32:05 -0600
From:      "Justin T. Gibbs" <gibbs@scsiguy.com>
To:        "M. Warner Losh" <imp@bsdimp.com>, gurney_j@resnet.uoregon.edu, gurney_j@efn.org
Cc:        freebsd-sparc64@freebsd.org
Subject:   Re: PCI bus numbering and orphaned devices
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>

next in thread | previous in thread | raw e-mail | index | archive | help
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?361340000.1055367125>