X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lspci.h;h=fefee5256423a4790487e06cd31419eb8d5d978a;hb=018f413ceb674d3c5c52a3a78bcad3b9daab9a26;hp=81aca269ae99a8a356c668ce25c9815541e31369;hpb=17ec7e70ea71a3ccbccf9f3b9cfe846eb1200e0d;p=pciutils.git diff --git a/lspci.h b/lspci.h index 81aca26..fefee52 100644 --- a/lspci.h +++ b/lspci.h @@ -1,7 +1,7 @@ /* * The PCI Utilities -- List All PCI Devices * - * Copyright (c) 1997--2010 Martin Mares + * Copyright (c) 1997--2018 Martin Mares * * Can be freely distributed and used under the terms of the GNU GPL. */ @@ -14,7 +14,7 @@ * This increases our memory footprint, but only slightly since we don't * use alloca() much. */ -#if defined (__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__) || defined (__DragonFly__) +#if defined (__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__) || defined (__DragonFly__) || defined (__DJGPP__) /* alloca() is defined in stdlib.h */ #elif defined(__GNUC__) && !defined(PCI_OS_WINDOWS) #include @@ -34,6 +34,11 @@ extern char *opt_pcimap; struct device { struct device *next; struct pci_dev *dev; + /* Bus topology calculated by grow_tree() */ + struct device *bus_next; + struct bus *parent_bus; + struct bridge *bridge; + /* Cache */ unsigned int config_cached, config_bufsize; byte *config; /* Cached configuration space data */ byte *present; /* Maps which configuration bytes are present */ @@ -64,11 +69,15 @@ void cap_vpd(struct device *d); /* ls-caps.c */ -void show_caps(struct device *d); +void show_caps(struct device *d, int where); /* ls-ecaps.c */ -void show_ext_caps(struct device *d); +void show_ext_caps(struct device *d, int type); + +/* ls-caps-vendor.c */ + +void show_vendor_caps(struct device *d, int where, int cap); /* ls-kernel.c */ @@ -78,7 +87,27 @@ void show_kernel_cleanup(void); /* ls-tree.c */ -void show_forest(void); +struct bridge { + struct bridge *chain; /* Single-linked list of bridges */ + struct bridge *next, *child; /* Tree of bridges */ + struct bus *first_bus; /* List of buses connected to this bridge */ + unsigned int domain; + unsigned int primary, secondary, subordinate; /* Bus numbers */ + struct device *br_dev; +}; + +struct bus { + unsigned int domain; + unsigned int number; + struct bus *sibling; + struct bridge *parent_bridge; + struct device *first_dev, **last_dev; +}; + +extern struct bridge host_bridge; + +void grow_tree(void); +void show_forest(struct pci_filter *filter); /* ls-map.c */