Use pci_is_pcie()
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 28 Dec 2008 02:55:09 +0000 (10:55 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 28 Dec 2008 03:45:36 +0000 (11:45 +0800)
sys/dev/netif/bge/if_bge.c
sys/dev/netif/re/if_re.c

index e130a21..4b10548 100644 (file)
@@ -1871,7 +1871,7 @@ bge_attach(device_t dev)
         * Check if this is a PCI-X or PCI Express device.
         */
        if (BGE_IS_5705_PLUS(sc)) {
-               if (pci_get_pciecap_ptr(dev) != 0) {
+               if (pci_is_pcie(dev)) {
                        sc->bge_flags |= BGE_FLAG_PCIE;
                        pcie_set_max_readrq(dev, PCIEM_DEVCTL_MAX_READRQ_4096);
                }
index c7afcc0..fac4661 100644 (file)
@@ -1019,7 +1019,7 @@ re_probe(device_t dev)
                                        sc->re_macver = RE_MACVER_28;
                                break;
                        }
-                       if (pci_get_pciecap_ptr(dev) != 0)
+                       if (pci_is_pcie(dev))
                                sc->re_caps |= RE_C_PCIE;
 
                        device_set_desc(dev, t->re_name);