@@ -69,15 +69,6 @@ struct pcie_port_service_driver {
int pcie_port_service_register(struct pcie_port_service_driver *new);
void pcie_port_service_unregister(struct pcie_port_service_driver *new);
-/*
- * The PCIe Capability Interrupt Message Number (PCIe r3.1, sec 7.8.2) must
- * be one of the first 32 MSI-X entries. Per PCI r3.0, sec 6.8.3.1, MSI
- * supports a maximum of 32 vectors per function.
- */
-#define PCIE_PORT_MAX_MSI_ENTRIES 32
-
-#define get_descriptor_id(type, service) (((type - 4) << 8) | service)
-
extern struct bus_type pcie_port_bus_type;
int __must_check pcie_port_bus_register(void);
void pcie_port_bus_unregister(void);
@@ -363,6 +363,13 @@ static int pcie_message_numbers(struct pci_dev *dev, int mask,
return nvec;
}
+/*
+ * The PCIe Capability Interrupt Message Number (PCIe r3.1, sec 7.8.2) must
+ * be one of the first 32 MSI-X entries. Per PCI r3.0, sec 6.8.3.1, MSI
+ * supports a maximum of 32 vectors per function.
+ */
+#define PCIE_PORT_MAX_MSI_ENTRIES 32
+
/**
* pcie_port_enable_irq_vec - try to set up MSI-X or MSI as interrupt mode
* for given port
@@ -528,6 +535,8 @@ static int get_port_device_capability(struct pci_dev *dev)
return services;
}
+#define get_descriptor_id(type, service) (((type - 4) << 8) | service)
+
/**
* pcie_device_init - allocate and initialize PCI Express port service device
* @pdev: PCI Express port to associate the service device with