diff options
-rw-r--r-- | sys/dev/cardbus/cardbus_cis.c | 2 | ||||
-rw-r--r-- | sys/dev/pci/pcireg.h | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/cardbus/cardbus_cis.c b/sys/dev/cardbus/cardbus_cis.c index 5b8481d..9e5ab03 100644 --- a/sys/dev/cardbus/cardbus_cis.c +++ b/sys/dev/cardbus/cardbus_cis.c @@ -451,7 +451,7 @@ cardbus_read_tuple_init(device_t cbdev, device_t child, uint32_t *start, space = *start & PCIM_CIS_ASI_MASK; switch (space) { - case PCIM_CIS_ASI_TUPLE: + case PCIM_CIS_ASI_CONFIG: if (cardbus_cis_debug) device_printf(cbdev, "CIS in PCI config space\n"); /* CIS in PCI config space need no initialization */ diff --git a/sys/dev/pci/pcireg.h b/sys/dev/pci/pcireg.h index 4bcf1b5..c6d61bd 100644 --- a/sys/dev/pci/pcireg.h +++ b/sys/dev/pci/pcireg.h @@ -116,8 +116,9 @@ /* config registers for header type 0 devices */ #define PCIR_BARS 0x10 -#define PCIR_BAR(x) (PCIR_BARS + (x) * 4) -#define PCI_RID2BAR(rid) (((rid)-PCIR_BARS)/4) +#define PCIR_BAR(x) (PCIR_BARS + (x) * 4) +#define PCI_MAX_BAR_0 5 /* Number of standard bars */ +#define PCI_RID2BAR(rid) (((rid) - PCIR_BARS) / 4) #define PCI_BAR_IO(x) (((x) & PCIM_BAR_SPACE) == PCIM_BAR_IO_SPACE) #define PCI_BAR_MEM(x) (((x) & PCIM_BAR_SPACE) == PCIM_BAR_MEM_SPACE) #define PCIM_BAR_SPACE 0x00000001 @@ -133,7 +134,7 @@ #define PCIM_BAR_IO_BASE 0xfffffffc #define PCIR_CIS 0x28 #define PCIM_CIS_ASI_MASK 0x7 -#define PCIM_CIS_ASI_TUPLE 0 +#define PCIM_CIS_ASI_CONFIG 0 #define PCIM_CIS_ASI_BAR0 1 #define PCIM_CIS_ASI_BAR1 2 #define PCIM_CIS_ASI_BAR2 3 @@ -143,6 +144,7 @@ #define PCIM_CIS_ASI_ROM 7 #define PCIM_CIS_ADDR_MASK 0x0ffffff8 #define PCIM_CIS_ROM_MASK 0xf0000000 +#define PCIM_CIS_CONFIG_MASK 0xff #define PCIR_SUBVEND_0 0x2c #define PCIR_SUBDEV_0 0x2e #define PCIR_BIOS 0x30 |