Use bridge resource definitions instead of using the PCI_BRIDGE_RESOURCES constant with an integer offeset.
Showing the changes to include/linux (1 of 3 files). Show all
Unified · Split
| @@ -100,9 +100,21 @@ enum { · 99 unmodified lines | ||
| 100 | 100 | PCI_IOV_RESOURCE_END = PCI_IOV_RESOURCES + PCI_SRIOV_NUM_BARS - 1, |
| 101 | 101 | #endif |
| 102 | 102 | |
| 103 | − /* Resources assigned to buses behind the bridge */ | |
| 103 | +/* PCI-to-PCI (P2P) bridge windows */ | |
| 104 | +#define PCI_BRIDGE_IO_WINDOW (PCI_BRIDGE_RESOURCES + 0) | |
| 105 | +#define PCI_BRIDGE_MEM_WINDOW (PCI_BRIDGE_RESOURCES + 1) | |
| 106 | +#define PCI_BRIDGE_PREF_MEM_WINDOW (PCI_BRIDGE_RESOURCES + 2) | |
| 107 | + | |
| 108 | +/* CardBus bridge windows */ | |
| 109 | +#define PCI_CB_BRIDGE_IO_0_WINDOW (PCI_BRIDGE_RESOURCES + 0) | |
| 110 | +#define PCI_CB_BRIDGE_IO_1_WINDOW (PCI_BRIDGE_RESOURCES + 1) | |
| 111 | +#define PCI_CB_BRIDGE_MEM_0_WINDOW (PCI_BRIDGE_RESOURCES + 2) | |
| 112 | +#define PCI_CB_BRIDGE_MEM_1_WINDOW (PCI_BRIDGE_RESOURCES + 3) | |
| 113 | + | |
| 114 | +/* Total number of bridge resources for P2P and CardBus */ | |
| 104 | 115 | #define PCI_BRIDGE_RESOURCE_NUM 4 |
| 105 | 116 | |
| 117 | + /* Resources assigned to buses behind the bridge */ | |
| 106 | 118 | PCI_BRIDGE_RESOURCES, |
| 107 | 119 | PCI_BRIDGE_RESOURCE_END = PCI_BRIDGE_RESOURCES + |
| 108 | 120 | PCI_BRIDGE_RESOURCE_NUM - 1, |