PERFORCE change 1190644 for review
John Baldwin
jhb at FreeBSD.org
Wed Feb 5 13:25:57 UTC 2014
http://p4web.freebsd.org/@@1190644?ac=10
Change 1190644 by jhb at jhb_ralph on 2014/02/05 13:25:06
Handle PCI-PCI bridge bus number quirks when reserving bus
number resources.
Affected files ...
.. //depot/projects/pci/sys/dev/pci/pci.c#52 edit
.. //depot/projects/pci/sys/dev/pci/pci_pci.c#47 edit
Differences ...
==== //depot/projects/pci/sys/dev/pci/pci.c#52 (text+ko) ====
@@ -3221,8 +3221,9 @@
struct resource_list *rl)
{
struct resource *res;
+ char *cp;
u_long start, end, count;
- int rid, sec_bus, sec_reg, sub_bus, sub_reg;
+ int rid, sec_bus, sec_reg, sub_bus, sub_reg, sup_bus;
switch (cfg->hdrtype & PCIM_HDRTYPE) {
case PCIM_HDRTYPE_BRIDGE:
@@ -3248,6 +3249,38 @@
*/
sec_bus = PCI_READ_CONFIG(bus, dev, sec_reg, 1);
sub_bus = PCI_READ_CONFIG(bus, dev, sub_reg, 1);
+
+ /* Quirk handling. */
+ switch (pci_get_devid(dev)) {
+ case 0x12258086: /* Intel 82454KX/GX (Orion) */
+ supbus = pci_read_config(dev, 0x41, 1);
+ if (supbus != 0xff) {
+ sec_bus = supbus + 1;
+ sub_bus = supbus + 1;
+ }
+ break;
+
+ case 0x00dd10de:
+ /* Compaq R3000 BIOS sets wrong subordinate bus number. */
+ if ((cp = getenv("smbios.planar.maker")) == NULL)
+ break;
+ if (strncmp(cp, "Compal", 6) != 0) {
+ freeenv(cp);
+ break;
+ }
+ freeenv(cp);
+ if ((cp = getenv("smbios.planar.product")) == NULL)
+ break;
+ if (strncmp(cp, "08A0", 4) != 0) {
+ freeenv(cp);
+ break;
+ }
+ freeenv(cp);
+ if (sub_bus < 0xa)
+ sub_bus = 0xa;
+ break;
+ }
+
if (bootverbose || 1)
printf("\tsecbus=%d, subbus=%d\n", sec_bus, sub_bus);
if (sec_bus > 0 && sub_bus >= sec_bus) {
==== //depot/projects/pci/sys/dev/pci/pci_pci.c#47 (text+ko) ====
@@ -957,8 +957,6 @@
}
break;
}
-#else
- /* XXX: This is now broken */
#endif
/*
More information about the p4-projects
mailing list