From 3d0a6d881571712f234a8b5733eaa194c50d7885 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sat, 14 May 2016 11:30:40 +0200 Subject: [PATCH] A few minor corrections to the IORESOURCE changes --- lib/header.h | 4 ++-- lib/internal.h | 1 + lib/pci.h | 4 ++-- lspci.c | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/header.h b/lib/header.h index 3c3664f..0183d1f 100644 --- a/lib/header.h +++ b/lib/header.h @@ -1237,6 +1237,6 @@ #define PCI_VENDOR_ID_INTEL 0x8086 #define PCI_VENDOR_ID_COMPAQ 0x0e11 -/* taken from */ +/* I/O resource flags, compatible with */ -#define IORESOURCE_PCI_EA_BEI (1<<5) +#define PCI_IORESOURCE_PCI_EA_BEI (1<<5) diff --git a/lib/internal.h b/lib/internal.h index 7e101ab..f888b51 100644 --- a/lib/internal.h +++ b/lib/internal.h @@ -70,6 +70,7 @@ int pci_fill_info_v31(struct pci_dev *, int flags) VERSIONED_ABI; int pci_fill_info_v32(struct pci_dev *, int flags) VERSIONED_ABI; int pci_fill_info_v33(struct pci_dev *, int flags) VERSIONED_ABI; int pci_fill_info_v34(struct pci_dev *, int flags) VERSIONED_ABI; +int pci_fill_info_v35(struct pci_dev *, int flags) VERSIONED_ABI; /* params.c */ void pci_define_param(struct pci_access *acc, char *param, char *val, char *help); diff --git a/lib/pci.h b/lib/pci.h index a86bfd7..6d904dd 100644 --- a/lib/pci.h +++ b/lib/pci.h @@ -136,8 +136,8 @@ struct pci_dev { char *module_alias; /* Linux kernel module alias */ char *label; /* Device name as exported by BIOS */ int numa_node; /* NUMA node */ - pciaddr_t flags[6]; /* Region IORESOURCE flags */ - pciaddr_t rom_flags; /* Expansion ROM IORESOURCE flags */ + pciaddr_t flags[6]; /* PCI_IORESOURCE_* flags for regions */ + pciaddr_t rom_flags; /* PCI_IORESOURCE_* flags for expansion ROM */ /* Fields used internally: */ struct pci_access *access; diff --git a/lspci.c b/lspci.c index 52d14f3..5b6716e 100644 --- a/lspci.c +++ b/lspci.c @@ -365,7 +365,7 @@ show_bases(struct device *d, int cnt) printf("\tRegion %d: ", i); else putchar('\t'); - if (ioflg & IORESOURCE_PCI_EA_BEI) + if (ioflg & PCI_IORESOURCE_PCI_EA_BEI) printf("[enhanced] "); else if (pos && !flg) /* Reported by the OS, but not by the device */ { @@ -441,7 +441,7 @@ show_rom(struct device *d, int reg) if (!rom && !flg && !len) return; putchar('\t'); - if (ioflg & IORESOURCE_PCI_EA_BEI) + if (ioflg & PCI_IORESOURCE_PCI_EA_BEI) printf("[enhanced] "); else if ((rom & PCI_ROM_ADDRESS_MASK) && !(flg & PCI_ROM_ADDRESS_MASK)) { -- 2.39.2