diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2007-02-14 22:36:27 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2007-02-14 22:36:27 +0000 |
| commit | f13fc7c89331e4c4236b9220e2e8eba7e41af824 (patch) | |
| tree | e52868a619ef3fdb7dd16949f2fa1ddf6b0b4361 /sys/dev/pci | |
| parent | ea3f508362f9a4c46874690b4609b0567e581962 (diff) | |
Notes
Diffstat (limited to 'sys/dev/pci')
| -rw-r--r-- | sys/dev/pci/pci.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 494a9b5cd9e1..fae9ba2295f7 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -217,6 +217,7 @@ struct pci_quirk pci_quirks[] = { struct devlist pci_devq; uint32_t pci_generation; uint32_t pci_numdevs = 0; +static int pcie_chipset, pcix_chipset; /* sysctl vars */ SYSCTL_NODE(_hw, OID_AUTO, pci, CTLFLAG_RD, 0, "PCI bus tuning parameters"); @@ -586,6 +587,27 @@ pci_read_extcap(device_t pcib, pcicfgregs *cfg) cfg->subdevice = val >> 16; } break; + case PCIY_PCIX: /* PCI-X */ + /* + * Assume we have a PCI-X chipset if we have + * at least one PCI-PCI bridge with a PCI-X + * capability. Note that some systems with + * PCI-express or HT chipsets might match on + * this check as well. + */ + if ((cfg->hdrtype & PCIM_HDRTYPE) == 1) + pcix_chipset = 1; + break; + case PCIY_EXPRESS: /* PCI-express */ + /* + * Assume we have a PCI-express chipset if we have + * at least one PCI-express root port. + */ + val = REG(ptr + PCIR_EXPRESS_FLAGS, 2); + if ((val & PCIM_EXP_FLAGS_TYPE) == + PCIM_EXP_TYPE_ROOT_PORT) + pcie_chipset = 1; + break; default: break; } @@ -1404,6 +1426,10 @@ pci_msi_blacklisted(void) if (!pci_honor_msi_blacklist) return (0); + /* Blacklist all non-PCI-express and non-PCI-X chipsets. */ + if (!(pcie_chipset || pcix_chipset)) + return (1); + dev = pci_find_bsf(0, 0, 0); if (dev != NULL) return (pci_msi_device_blacklisted(dev)); |
