Subject: Re: CardBus PCI
To: Masanori Kanaoka <kanaoka@ann.hi-ho.ne.jp>
From: Michael Richardson <mcr@solidum.com>
List: tech-kern
Date: 04/23/2001 19:07:25
  What does the second patch do? You seem to have changed your
mind about testing for AGP...

  After struggling a bit with config_found() (pba.ppa_busname *must*
be "pci" :-)

  As I knew that the PCI bridge would not be visible to the BIOS until
the card had been activated, I arranged to call pci_bus_fixup() if
the bus number is 0.

  It seems to assign the subordinate bus number okay.

  What it doesn't seem to do, which I think results in the scan of PCI
bus #4 to fail (I expect to see another 21152 bridge on bus #4, and
an RTL8139 on bus #5) is that the cardbus bridge (bridge #2) has not has its 
subordinate bus numbers increased.

  I'm going to try "solving" this by asking pci_bus_fixup() with 0 instead,
but I'm not real fond of this, I think.
  In the general case, this might, as far as I can understand, result in PCI
buses being renumbered, no? 

  I recall Jason muttering something about this before.

  We will have to cross these issues soon with hotswap PCI support at some
point.
  (We are trying to "miniturize" a demo)

cardbus_attach_card: cb1 start
cardbus_attach_card: Vendor 0x1011, Product 0x24, CIS 0x0
cardbus1: reading CIS data from configuration space
WRONG TUPLE: 0x11
WRONG TUPLE: 0x11
ppb1 at cardbus1 dev 0 function 0: Digital Equipment DECchip 21152 PCI-PCI
Bridge (rev. 0x03)
ppb1: not configured by system firmware calling pci_bus_fixup(3)
PCI fixup examining 1011:24
PCI bridge 3: primary 3, secondary 4, subordinate 4
[System BIOS Setting]-----------------------
  device vendor product
  register space address    size
--------------------------------------------
000:00:0 0x8086 0x7190 
        10h mem  0x50000000 0x04000000
                [OK]
000:01:0 0x8086 0x7191 
                [OK]
000:04:0 0x104c 0xac1b 
        10h mem  0x41100000 0x00001000
                [OK]
000:04:1 0x104c 0xac1b 
        10h mem  0x41180000 0x00001000
                [OK]
000:07:0 0x8086 0x7110 
                [OK]
000:07:1 0x8086 0x7111 
        20h port 0x00003420 0x00000010
                [OK]
000:07:2 0x8086 0x7112 
        20h port 0x00003400 0x00000020
                [OK]
000:07:3 0x8086 0x7113 
                [OK]
000:08:0 0x125d 0x1978 
        10h port 0x00003000 0x00000100
                [OK]
000:09:0 0x8086 0x1229 
        10h mem  0x41280000 0x00001000
        14h port 0x00003440 0x00000040
        18h mem  0x41200000 0x00020000
                [OK]
000:09:1 0x11c1 0x0445 
        10h port 0x00003430 0x00000008
        14h mem  0x41300000 0x00001000
                [OK]
001:00:0 0x1002 0x4c4d 
        10h mem  0x40000000 0x01000000
        14h port 0x00002000 0x00000100
        18h mem  0x41000000 0x00001000
                [OK]
003:00:0 0x1011 0x0024 
                [OK]
--------------------------[  0 devices bogus]
 Physical memory end: 0x07fed000
 PCI memory mapped I/O space start: 0x08000000
pci2 at ppb1 bus 4 (rbus)
pci2: i/o space, memory space enabled
  

after pci_bus_fixup(0)