freebsd-skq/sys/dev
John Baldwin 9debb53220 According to the ACPI spec, the bus number of the child PCI bus of a host
to PCI bridge can be read be evaluating the _BBN method of the host to PCI
device.  Unfortunately, there appear to be some lazy/ignorant/moronic/
whatever BIOS writers that return 0 for _BBN for all host to PCI bridges in
the system.  On a system with a single host to PCI bridge this is not a
problem as the child bus of that single bridge will be bus 0 anyway.
However, on systems with multiple host to PCI bridges and l/i/m/w BIOS
writers this is a major problem resulting in all but the first host to
PCI bridge failing to attach.  So, this adds a workaround.

If the _BBN of a host to PCI bridge is zero and pcib0 already exists
and is not us, the we use _ADR to look up our PCI function and slot
(we currently assume we are on bus 0) and use that to call
host_pcib_get_busno() to try and extract our bus number from config
registers on the host to PCI bridge device.  If that fails, then we make
an evil assumption that ACPI's _SB_ namespace lays out the host to PCI
bridges in ascending order and use our pcib unit number as our bus
number.

Approved by:	re
2002-11-22 18:11:13 +00:00
..
aac Fix mis-indentation. 2002-10-20 16:00:43 +00:00
acpica According to the ACPI spec, the bus number of the child PCI bus of a host 2002-11-22 18:11:13 +00:00
advansys Change BUS_SPACE_UNRESTRICTED (~0ul) to plain ~0 when used in the 2002-10-09 08:50:26 +00:00
agp Remove a bunch of #include "opt_pci.h". 2002-11-13 17:40:15 +00:00
aha Fix build on alpha. It used to case an int to a pointer in order to do 2002-10-09 09:30:57 +00:00
ahb Fix new gcc-3.1 warnings. I think this gets GENERIC compiling cleanly 2002-05-24 05:21:36 +00:00
aic Add second and thrid bus-toaster IDs 2002-11-14 05:08:22 +00:00
aic7xxx Use better return types and a couple of casts to eliminate warnings on 2002-11-12 10:22:49 +00:00
amd Fix some sizeof(int) != sizeof(void *) warnings. 2002-11-08 21:30:26 +00:00
amr Added support for DELL Perc4/DI. 2002-11-21 16:06:10 +00:00
an network interface driver changes: 2002-11-14 23:54:55 +00:00
ar network interface driver changes: 2002-11-14 23:54:55 +00:00
asr Use a bandaid to fix a warning. However, this driver is very, very far 2002-11-06 19:42:59 +00:00
ata Use [u]intmax_t and %j instead of long long and %ll to better fix warnings 2002-11-07 22:23:46 +00:00
atkbdc Include "opt_kbd.h" since certain structures size depend on the value 2002-10-15 21:35:01 +00:00
awi network interface driver changes: 2002-11-14 23:54:55 +00:00
bge network interface driver changes: 2002-11-14 23:54:55 +00:00
bktr More int != pointer stuff. 2002-11-06 20:16:39 +00:00
buslogic Add some band-aid casts to quiet warnings. This driver still assumes 2002-11-06 20:34:38 +00:00
cardbus MFp4: 2002-11-14 05:12:02 +00:00
ccd - Use vrefcnt() instead of v_usecount. 2002-09-25 02:42:43 +00:00
ciss Fix a bunch of warnings on 64 bit platforms in the 2002-10-27 12:27:04 +00:00
cm network interface driver changes: 2002-11-14 23:54:55 +00:00
cnw network interface driver changes: 2002-11-14 23:54:55 +00:00
cs network interface driver changes: 2002-11-14 23:54:55 +00:00
ct This file does not <sys/disklabel.h> 2002-09-20 18:15:40 +00:00
cy Change the suser() API to take advantage of td_ucred as well as do a 2002-04-01 21:31:13 +00:00
dc o track either_ifattach/ether_ifdetach API changes 2002-11-14 23:49:09 +00:00
de o track either_ifattach/ether_ifdetach API changes 2002-11-14 23:49:09 +00:00
dec Introduce a boot environment variable (clock_compat_osf1) which can 2001-11-03 17:22:50 +00:00
dgb Be consistent about "static" functions: if the function is marked 2002-09-28 17:15:38 +00:00
digi Be consistent about "static" functions: if the function is marked 2002-09-28 17:15:38 +00:00
dpt Use bus_addr_t instead of u_int32_t in functions to convert between 2002-11-06 21:19:17 +00:00
drm In an SMP environment post-Giant it is no longer safe to blindly 2002-10-03 02:13:00 +00:00
ed network interface driver changes: 2002-11-14 23:54:55 +00:00
eisa Add tunable "hw.eisa_slots" to allow overriding the default number 2002-10-31 00:45:49 +00:00
em network interface driver changes: 2002-11-14 23:54:55 +00:00
en network interface driver changes: 2002-11-14 23:54:55 +00:00
ep network interface driver changes: 2002-11-14 23:54:55 +00:00
ex network interface driver changes: 2002-11-14 23:54:55 +00:00
exca Update comments to remind me about power bugs in oldcard. 2002-10-07 06:18:50 +00:00
fb Warning fixes. 2002-11-11 10:28:44 +00:00
fdc Capitalize the first letter of device descriptions 2002-11-11 15:26:08 +00:00
fe network interface driver changes: 2002-11-14 23:54:55 +00:00
firewire network interface driver changes: 2002-11-14 23:54:55 +00:00
fxp network interface driver changes: 2002-11-14 23:54:55 +00:00
gem Catch up with sam's changes to network interfaces. 2002-11-15 14:36:33 +00:00
gfb Move include of opt_fb.h earlier so that FB_INSTALL_CDEV is defined in 2002-11-08 21:04:44 +00:00
gx network interface driver changes: 2002-11-14 23:54:55 +00:00
hea - Change the ATM stack functions to use intptr_t instead of int for opaque 2002-11-08 18:27:30 +00:00
hfa Adjust some casts to quiet warnings. 2002-11-06 22:58:55 +00:00
hifn whitespace/indentation fix from phk 2002-10-16 17:07:41 +00:00
hme network interface driver changes: 2002-11-14 23:54:55 +00:00
ic Move the com_scr register address definition over with the other seven. 2002-09-22 08:51:31 +00:00
ichsmb typo. 2002-10-18 12:06:01 +00:00
ida Use [u]intmax_t and %j instead of long long and %ll to better fix warnings 2002-11-07 22:23:46 +00:00
idt Use more standard variable names for modevent functions. 2002-10-02 04:47:52 +00:00
ie network interface driver changes: 2002-11-14 23:54:55 +00:00
iicbus network interface driver changes: 2002-11-14 23:54:55 +00:00
iir Use [u]intmax_t and %j instead of long long and %ll to better fix warnings 2002-11-07 22:23:46 +00:00
isp LINT related fixes (as noticed by bde) 2002-10-14 22:13:51 +00:00
ispfw Know that a 10160 is the same as a 12160. 2002-10-12 00:12:31 +00:00
joy Fix typo in the BSD copyright: s/withough/without/ 2002-06-02 20:05:59 +00:00
kbd Include "opt_kbd.h" since certain structures size depend on the value 2002-10-15 21:35:01 +00:00
lge network interface driver changes: 2002-11-14 23:54:55 +00:00
lmc Remove #include <pci.h> - there is no abuse of NPCI here 2002-07-21 05:16:14 +00:00
lnc network interface driver changes: 2002-11-14 23:54:55 +00:00
mc146818
mca Argh, isa(4), eisa(4) and mca(4) now attach to legacy(4) instead of 2002-09-26 18:40:06 +00:00
mcd Replace {disable,enable}_intr() with critical_{enter,exit}(). 2002-11-10 03:45:49 +00:00
md We want /dev/md0 for ramdisk roots, not /dev/md0c. 2002-10-21 20:08:28 +00:00
mii Remove unnecessary <sys/malloc.h> include. 2002-10-29 00:20:47 +00:00
mk48txx Add a driver back end for the Mostek MK48T02, MK48T08 and MK48T59 2002-04-04 23:44:42 +00:00
mlx use __packed. 2002-09-23 18:54:32 +00:00
mly Pass correct parameters to bus_space_barrier() instead of 0 2002-11-14 13:25:53 +00:00
mpt Be consistent about functions being static. 2002-10-16 08:48:39 +00:00
mse Fixed some style bugs in the removal of __P(()). The main ones were 2002-03-23 16:01:49 +00:00
musycc Use %z and %j to quiet warnings. 2002-11-07 22:21:38 +00:00
my network interface driver changes: 2002-11-14 23:54:55 +00:00
ncv Remove #include of <sys/disklabel.h> (and a few other unused #includes I 2002-09-20 16:49:36 +00:00
nge network interface driver changes: 2002-11-14 23:54:55 +00:00
nmdm Change the suser() API to take advantage of td_ucred as well as do a 2002-04-01 21:31:13 +00:00
nsp Remove unused #includes. Looks amacingly like the exact same set 2002-09-20 16:51:09 +00:00
null Everywhere else, an argument passed to a device containing flags 2002-09-21 17:28:17 +00:00
ofw Create the ofwcons device at SI_SUB_CONFIGURE instead of SI_SUB_DRIVERS, 2002-11-18 06:19:12 +00:00
pccard Fix printf() format errors. 2002-11-14 14:02:32 +00:00
pccbb MFp4: 2002-11-14 05:20:39 +00:00
pcf Fix bktr and pcf compilation with LINT 2002-03-25 21:22:35 +00:00
pci Add a function host_pcib_get_bnsno() that attempts to determine the bus 2002-11-22 17:50:47 +00:00
pcic DETACH_FORCE was removed recently. Remove it here, even though this 2002-11-17 04:52:37 +00:00
pdq network interface driver changes: 2002-11-14 23:54:55 +00:00
ppbus network interface driver changes: 2002-11-14 23:54:55 +00:00
ppc Restore the original copyright 2002-03-23 15:36:13 +00:00
pst Fix so it compiles with the new disklabel stuff. 2002-09-27 21:56:35 +00:00
puc Add "missing scratch-pad register" to the first of the two ports 2002-09-27 22:02:46 +00:00
raidframe Reduce namespace pollution to userland. 2002-10-28 17:08:07 +00:00
random Some kernel threads try to do significant work, and the default KSTACK_PAGES 2002-10-02 07:44:29 +00:00
ray network interface driver changes: 2002-11-14 23:54:55 +00:00
rc Use critical_enter/exit instead of disable/enable_intr to make this 2002-11-08 18:32:57 +00:00
rp Fix data corruption caused by last byte in oddly sized transfers being read 2002-10-20 18:43:11 +00:00
sab Setup a default tty mode even if the device is not the console. Don't 2002-11-18 05:56:43 +00:00
sbni network interface driver changes: 2002-11-14 23:54:55 +00:00
scd Replace {disable,enable}_intr() with critical_{enter,exit}(). 2002-11-10 03:45:49 +00:00
sf o track either_ifattach/ether_ifdetach API changes 2002-11-14 23:49:09 +00:00
si Cast a pointer to uintptr_t instead ot u_int. 2002-11-07 19:56:21 +00:00
sio Make 'rclk' a uintptr_t to quiet warnings. 2002-11-07 22:22:10 +00:00
sk o track either_ifattach/ether_ifdetach API changes 2002-11-14 23:49:09 +00:00
smbus Cleanup of amdpm(4). 2002-09-21 21:43:49 +00:00
sn network interface driver changes: 2002-11-14 23:54:55 +00:00
snc network interface driver changes: 2002-11-14 23:54:55 +00:00
snp Declare the snp ioctl()s to work on udev_t, since that is what they 2002-11-11 10:45:31 +00:00
sound Packed structures are defined differently in older gcc's, like the one 2002-11-06 21:37:21 +00:00
speaker Merge PC98 changes. 2002-11-02 04:18:10 +00:00
sr network interface driver changes: 2002-11-14 23:54:55 +00:00
stg Remove even more Copy&Pasted sets of #includes. 2002-09-20 16:53:19 +00:00
streams Remove __P. 2002-03-20 02:08:01 +00:00
sym Fix instances of macros with improperly parenthasized arguments. 2002-11-09 12:55:07 +00:00
syscons Do not try to work around ``poor (un)sign extension code'' 2002-10-20 22:50:13 +00:00
tdfx Print pointers with %p instead of casting them to an unsigned int and 2002-11-07 21:19:47 +00:00
tga - Move opt_fb.h earlier so it covers included headers. 2002-11-08 21:10:53 +00:00
ti o track either_ifattach/ether_ifdetach API changes 2002-11-14 23:49:09 +00:00
trm Remove the remaining calls to free(), they are not needed anymore now 2002-11-14 19:54:33 +00:00
twe Fix instances of macros with improperly parenthasized arguments. 2002-11-09 12:55:07 +00:00
tx network interface driver changes: 2002-11-14 23:54:55 +00:00
txp network interface driver changes: 2002-11-14 23:54:55 +00:00
ubsec Quiet some DIAGNOSTIC printf warnings with band-aid casts. 2002-11-07 21:25:49 +00:00
usb Apply some fixups in the driver_t's. 2002-11-17 14:22:37 +00:00
vinum Explicitly cast daddr_t's to long long's when printing them since daddr_t 2002-11-07 21:52:51 +00:00
vr o track either_ifattach/ether_ifdetach API changes 2002-11-14 23:49:09 +00:00
vx network interface driver changes: 2002-11-14 23:54:55 +00:00
wds - Use %p to print pointers instead of casting pointers to an int and using 2002-11-07 22:25:13 +00:00
wi network interface driver changes: 2002-11-14 23:54:55 +00:00
wl network interface driver changes: 2002-11-14 23:54:55 +00:00
xe network interface driver changes: 2002-11-14 23:54:55 +00:00