aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pcieport_if.h
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2009-01-13 08:46:46 -0500
committerJesse Barnes <jbarnes@hobbes.lan>2009-03-19 22:29:23 -0400
commit22106368c999246c414610dcaacd485e741605b1 (patch)
tree2c74166b9967118e863012e6c81e03f9c7345bfd /include/linux/pcieport_if.h
parent0516c8bcd25293f438573101c439ce25a18916ad (diff)
PCI: PCIe portdrv: Remove struct pcie_port_service_id
The PCI Express port driver uses 'struct pcie_port_service_id' for matching port service devices and drivers, but this structure contains fields that duplicate information from the port device itself (vendor, device, subvendor, subdevice) and fields that are not used by any existing port service driver (class, class_mask, drvier_data). Also, both existing port service drivers (AER and PCIe HP) don't even use the vendor and device fields for device matching. Therefore 'struct pcie_port_service_id' can be removed altogether and the only useful members of it (port_type, service) can be introduced directly into the port service device and port service driver structures. That simplifies the code quite a bit and reduces its size. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'include/linux/pcieport_if.h')
-rw-r--r--include/linux/pcieport_if.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/include/linux/pcieport_if.h b/include/linux/pcieport_if.h
index 59e90b8a7839..a3832079508e 100644
--- a/include/linux/pcieport_if.h
+++ b/include/linux/pcieport_if.h
@@ -27,18 +27,15 @@
27#define PCIE_PORT_MSI_MODE 1 27#define PCIE_PORT_MSI_MODE 1
28#define PCIE_PORT_MSIX_MODE 2 28#define PCIE_PORT_MSIX_MODE 2
29 29
30struct pcie_port_service_id { 30struct pcie_port_data {
31 __u32 vendor, device; /* Vendor and device ID or PCI_ANY_ID*/ 31 int port_type; /* Type of the port */
32 __u32 subvendor, subdevice; /* Subsystem ID's or PCI_ANY_ID */ 32 int port_irq_mode; /* [0:INTx | 1:MSI | 2:MSI-X] */
33 __u32 class, class_mask; /* (class,subclass,prog-if) triplet */
34 __u32 port_type, service_type; /* Port Entity */
35 kernel_ulong_t driver_data;
36}; 33};
37 34
38struct pcie_device { 35struct pcie_device {
39 int irq; /* Service IRQ/MSI/MSI-X Vector */ 36 int irq; /* Service IRQ/MSI/MSI-X Vector */
40 struct pcie_port_service_id id; /* Service ID */ 37 struct pci_dev *port; /* Root/Upstream/Downstream Port */
41 struct pci_dev *port; /* Root/Upstream/Downstream Port */ 38 u32 service; /* Port service this device represents */
42 void *priv_data; /* Service Private Data */ 39 void *priv_data; /* Service Private Data */
43 struct device device; /* Generic Device Interface */ 40 struct device device; /* Generic Device Interface */
44}; 41};
@@ -67,7 +64,9 @@ struct pcie_port_service_driver {
67 /* Link Reset Capability - AER service driver specific */ 64 /* Link Reset Capability - AER service driver specific */
68 pci_ers_result_t (*reset_link) (struct pci_dev *dev); 65 pci_ers_result_t (*reset_link) (struct pci_dev *dev);
69 66
70 const struct pcie_port_service_id *id_table; 67 int port_type; /* Type of the port this driver can handle */
68 u32 service; /* Port service this device represents */
69
71 struct device_driver driver; 70 struct device_driver driver;
72}; 71};
73#define to_service_driver(d) \ 72#define to_service_driver(d) \