Re: PCI bus numbering and orphaned devices

From: Justin T. Gibbs <gibbs_at_scsiguy.com>
Date: Wed, 11 Jun 2003 15:51:51 -0600
> : > 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.
>
> hdrtype would be 0xff.  0xff & 0x7f is 0x7f, which is greater than 2.

Sorry.  Read the test backwards.

--
Justin
Received on Wed Jun 11 2003 - 12:53:28 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:11 UTC