From c41c1eb74663f6c14a99ce348b1ac201e18cb5f9 Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Wed, 22 Mar 2006 00:36:04 +0000 Subject: Add pci_find_device() a helper function for enumerating the PCI bus, from NetBSD. This is useful for things like finding another device in a driver ie ISA bridge in pciide. ok brad@ grange@, looks ok kettenis@ --- sys/dev/pci/pcivar.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/dev/pci/pcivar.h') diff --git a/sys/dev/pci/pcivar.h b/sys/dev/pci/pcivar.h index 9329ef809a6..cabf04e4946 100644 --- a/sys/dev/pci/pcivar.h +++ b/sys/dev/pci/pcivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pcivar.h,v 1.46 2006/03/19 21:25:04 brad Exp $ */ +/* $OpenBSD: pcivar.h,v 1.47 2006/03/22 00:36:03 jsg Exp $ */ /* $NetBSD: pcivar.h,v 1.23 1997/06/06 23:48:05 thorpej Exp $ */ /* @@ -209,6 +209,8 @@ int pci_matchbyid(struct pci_attach_args *, const struct pci_matchid *, int); * Helper functions for autoconfiguration. */ const char *pci_findvendor(pcireg_t); +int pci_find_device(struct pci_attach_args *pa, + int (*match)(struct pci_attach_args *)); int pci_probe_device(struct pci_softc *, pcitag_t tag, int (*)(struct pci_attach_args *), struct pci_attach_args *); void pci_devinfo(pcireg_t, pcireg_t, int, char *, size_t); -- cgit v1.2.3