Subject: RE: PCI enumeration (was: ne2000 PCMCIA not working as PCMCIA eit
To: 'tech-kern@netbsd.org' <tech-kern@netbsd.org>
From: Adam Glass (Exchange) <adamg@Exchange.Microsoft.com>
List: tech-kern
Date: 10/16/1999 12:38:07
If you can hot-add the bridge, then yes you need to be able to renumber *OR*
the bios vendor has to have deliberately spread the bridge numbers to leave
space for hot-added bridges.

As you say this is a more significant issue with hot plug PCI & CompactPCI.

As a datapoint, NT5 doesn't renumber buses.  I'd be curious to hear who
does.

regards,
Adam

-----Original Message-----
From: joda@pdc.kth.se [mailto:joda@pdc.kth.se]
Sent: Saturday, October 16, 1999 10:25 AM
To: Lennart Augustsson
Cc: Jason Thorpe; Peter Seebach; tech-kern@netbsd.org;
port-i386@netbsd.org
Subject: PCI enumeration (was: ne2000 PCMCIA not working as PCMCIA
either.)


Jason Thorpe <thorpej@nas.nasa.gov> writes:

> > FWIW, the CardBus code doesn't work right on my Dell Inspiron 3500,
either.

It seems to be quite common for BIOS:es to not be able to properly
configure hardware. In my ThinkPad, if I remove a pc-card at the wrong
time (when rebooting), the BIOS never completes whatever it's doing,
and the only way out is to power cycle.

Lennart Augustsson <lennart@augustsson.net> writes:

> Maybe it's time to write our own PCI enumeration code?

We need this for CardBus anyway.

My knowledge of how PCI works is somewhat limited, and this leads to
the obvious question `how should enumeration work?'

Let's say we have this setup with a PCI-PCI bridge, and two
PCI-CardBus bridges, numbers are primary, secondary, and subordinate
bus numbers.

 ==PCI 0===
  |       |
 PPB     CBB2
 0/1/2   0/3/3
  |
 CBB1
 1/2/2

If I now attach a CardBus-PCI or CardBus-CardBus bridge (like a multi
port ethernet card or something) to CBB1, does this mean I have to
renumber *all* PCI buses in the system? To somthing like:

 ==PCI 0===
  |       |
 PPB     CBB2
 0/1/3   0/4/4
  |
 CBB1
 1/2/3
  |
 CBB3
 2/3/3


If so, can any known OS do this right? There aren't that many
CardBus-whatever bridges out there, but there seem to be more and more
common to allow people to hot-swap PCI cards in various high-end
server systems.

(btw, I'm moving this thread to tech-kern)

/Johan