Re: pci probing "fixed" (was Re: PCI bus numbering and orphaned devices)

From: Bernd Walter <ticso_at_cicely12.cicely.de>
Date: Fri, 13 Jun 2003 01:23:30 +0200
On Thu, Jun 12, 2003 at 03:56:32PM -0700, John-Mark Gurney wrote:
> Well, I implemented PCI probing as per the UltraSparc IIi user's manual,
> and now, I get quite a bit more than I bargined for:
> bash-2.05b$ pciconf -l | wc
>       38     228    3106
> 
> The complete pciconf -l -v is at:
> http://people.freebsd.org/~jmg/pciconf-lv.sparc64
> 
> Now, I seem to be getting duplicates on some functions, and then of
> course, I am now seeing the firewire part of the SME2300BGA that doesn't
> have a phys attached to it.  (The driver does attach to the firewire
> part, but fails trying to talk to the phys.)

Maybe they are not really disabled.

> This also required updating the pci_read_device to ignore a all zero
> return value for PCIR_DEVVENDOR, and not probe higher functions in
> that case.  If I tried to probe higher functions (such as 0.0.2), the
> system would hang.

The only defined invalid vendor number is 0xffff.
The pcispace read functions should return all bits set in case a
device does not exist.

> A dmesg output of the boot is at:
> http://people.freebsd.org/~jmg/dmesg.sparc64
> 
> I don't include the dmesg that shows me attaching the firewire driver.
> 
> I have posted the patch to produce this at:
> http://people.freebsd.org/~jmg/sparc.patch

If the sparc64 part is the right way to do has to be commented by the
sparc64 guys.

Your patch still probes for additional functions without checking
if the device really is a multifunction device.
There are devices out there that react on every function although they
are single function.
Can you check this together with Warners patch?
Maybe we can also keep the original code, as the problem was not not
of machine independent nature as I originaly tought.

> Warning, this contains much debugging data, and probes for PCI devices
> that previously didn't get probed for. 
> 
> P.S. Sorry for the duplicate post to -sparc64.  I forgot that some of
> the -current crowd is interested in this work too.

If it changes MI part - yes.

-- 
B.Walter                   BWCT                http://www.bwct.de
ticso_at_bwct.de                                  info_at_bwct.de
Received on Thu Jun 12 2003 - 14:23:53 UTC

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