summaryrefslogtreecommitdiffstats
path: root/sys/pci/pcivar.h
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>1998-09-15 08:21:13 +0000
committergibbs <gibbs@FreeBSD.org>1998-09-15 08:21:13 +0000
commit9ed6892f4808d56de443849229e151f8f7ad43b0 (patch)
tree89826b5df23f21ac18045990671bb1f5e2dd537c /sys/pci/pcivar.h
parentb954e9c2642216af00a08bacef1878dbfff8107d (diff)
downloadFreeBSD-src-9ed6892f4808d56de443849229e151f8f7ad43b0.zip
FreeBSD-src-9ed6892f4808d56de443849229e151f8f7ad43b0.tar.gz
Revive PCIConf.
Submitted by: "Kenneth D. Merry" <ken@plutotech.com>
Diffstat (limited to 'sys/pci/pcivar.h')
-rw-r--r--sys/pci/pcivar.h30
1 files changed, 23 insertions, 7 deletions
diff --git a/sys/pci/pcivar.h b/sys/pci/pcivar.h
index 3d0afd4..f18b2b9 100644
--- a/sys/pci/pcivar.h
+++ b/sys/pci/pcivar.h
@@ -1,6 +1,3 @@
-#ifndef PCI_COMPAT
-#define PCI_COMPAT
-#endif
/*
* Copyright (c) 1997, Stefan Esser <se@freebsd.org>
* All rights reserved.
@@ -26,10 +23,20 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: pcivar.h,v 1.19 1998/07/22 08:39:08 dfr Exp $
+ * $Id: pcivar.h,v 1.20 1998/08/13 19:12:20 gibbs Exp $
*
*/
+#ifndef _PCIVAR_H_
+#define _PCIVAR_H_
+
+#ifndef PCI_COMPAT
+#define PCI_COMPAT
+#endif
+
+#include <pci/pci_ioctl.h> /* XXX KDM */
+#include <sys/queue.h>
+
/* some PCI bus constants */
#define PCI_BUSMAX 255 /* highest supported bus number */
@@ -65,8 +72,6 @@ typedef struct {
/* config header information common to all header types */
typedef struct pcicfg {
- struct pcicfg *parent;
- struct pcicfg *next;
pcimap *map; /* pointer to array of PCI maps */
void *hdrspec; /* pointer to header type specific data */
@@ -153,10 +158,20 @@ typedef struct pciattach {
struct pciattach *next;
} pciattach;
+struct pci_devinfo {
+ STAILQ_ENTRY(pci_devinfo) pci_links;
+ struct pci_device *device; /* should this be ifdefed? */
+ pcicfgregs cfg;
+ struct pci_conf conf;
+};
+
+extern u_int32_t pci_numdevs;
+
+
/* externally visible functions */
int pci_probe (pciattach *attach);
-void pci_drvattach(pcicfgregs *cfg);
+void pci_drvattach(struct pci_devinfo *dinfo);
/* low level PCI config register functions provided by pcibus.c */
@@ -208,3 +223,4 @@ int pci_unmap_int (pcici_t tag);
int pci_register_lkm (struct pci_device *dvp, int if_revision);
#endif /* PCI_COMPAT */
+#endif /* _PCIVAR_H_ */
OpenPOWER on IntegriCloud