acpi/pcib: Rework the _BBN handling for Host-PCI bridges.
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 7 Apr 2011 10:11:16 +0000 (18:11 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 7 Apr 2011 10:27:14 +0000 (18:27 +0800)
commit6b7d068d64b43c22bd94780672ee429baa09e8c0
tree3a01ae5afe451a4c2f8291edf1c3fed24b000362
parentf4440850c0534454cce73def122ae587c15c9006
acpi/pcib: Rework the _BBN handling for Host-PCI bridges.

Obtained-from: FreeBSD (Revision 193829 by jhb@freebsd.org)

  Previously we only trusted a _BBN value of 0 if it was for the first
  bridge encountered since some older systems returned _BBN of 0 for
  all bridges.  However, some newer systems enumerate bridges with
  non-zero _BBN before bus 0 which is perfectly valid.  Handle both
  cases by trusting the first bridge that has a _BBN of 0 and falling
  back to reading from non-standard config registers only for
  subsequent bridges with a _BBN of 0.  We also only perform this
  check for segment (domain) 0.  We assume that _BBN is always correct
  for segments other than 0.
sys/dev/acpica5/acpi_pcib_acpi.c