summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_re_pci.c
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2008-10-05 22:32:12 +0000
committerBrad Smith <brad@cvs.openbsd.org>2008-10-05 22:32:12 +0000
commit27ff411066626f50207e003253d6ddec5dfd83b0 (patch)
tree4a41e9d1083ac095ff38fd2b1589d35f6e2e6181 /sys/dev/pci/if_re_pci.c
parent2fc13cfc67583a40640ee5cf5b8e1265bebd9116 (diff)
Detect if the adapter is a PCIe adapter and set the RL_FLAG_PCIE flag
if so.
Diffstat (limited to 'sys/dev/pci/if_re_pci.c')
-rw-r--r--sys/dev/pci/if_re_pci.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/pci/if_re_pci.c b/sys/dev/pci/if_re_pci.c
index f205c8af679..db822c3285b 100644
--- a/sys/dev/pci/if_re_pci.c
+++ b/sys/dev/pci/if_re_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_re_pci.c,v 1.21 2008/04/20 00:34:39 brad Exp $ */
+/* $OpenBSD: if_re_pci.c,v 1.22 2008/10/05 22:32:11 brad Exp $ */
/*
* Copyright (c) 2005 Peter Valchev <pvalchev@openbsd.org>
@@ -187,6 +187,13 @@ re_pci_attach(struct device *parent, struct device *self, void *aux)
sc->sc_dmat = pa->pa_dmat;
+ /*
+ * PCI Express check.
+ */
+ if (pci_get_capability(pc, pa->pa_tag, PCI_CAP_PCIEXPRESS,
+ NULL, NULL))
+ sc->rl_flags |= RL_FLAG_PCIE;
+
/* Call bus-independent attach routine */
re_attach(sc, intrstr);
}