aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/pci/pcie/portdrv.h
diff options
context:
space:
mode:
authorKeith Busch <keith.busch@intel.com>2016-05-03 09:58:11 -0500
committerBjorn Helgaas <bhelgaas@google.com>2016-05-03 09:58:11 -0500
commit6d81417da8720b393f670de9cce03a3642ea9a30 (patch)
treefd65db1a902ba99f3e5bef60a7e2ac02967e4aba /drivers/pci/pcie/portdrv.h
parentLinux 4.6-rc2 (diff)
downloadwireguard-linux-6d81417da8720b393f670de9cce03a3642ea9a30.tar.xz
wireguard-linux-6d81417da8720b393f670de9cce03a3642ea9a30.zip
PCI: Widen portdrv service type from 4 bits to 8 bits
The names of port service devices previously used one nibble to encode the port type and another nibble to encode the service type. We're about to add a fifth service type, so change device names to use one *byte* to encode the service type. For example, a hotplug port service on a downstream bridge was previously called "pcie24" and is now called "pcie204". The "2" encodes the device type (PCI_EXP_TYPE_DOWNSTREAM - 4), and the "4" (now "04") encodes the service (PCIE_PORT_SERVICE_HP). Based on Lukas Wunner's patch: https://github.com/l1k/linux/commit/b688d6e4873ab082e5916b1a993bc1d38c6f4178 [bhelgaas: split to separate patch, expand changelog] Based-on-patch-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/pcie/portdrv.h')
-rw-r--r--drivers/pci/pcie/portdrv.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/pcie/portdrv.h b/drivers/pci/pcie/portdrv.h
index d525548404d6..63cb2ef9c5ae 100644
--- a/drivers/pci/pcie/portdrv.h
+++ b/drivers/pci/pcie/portdrv.h
@@ -18,7 +18,7 @@
*/
#define PCIE_PORT_MAX_MSIX_ENTRIES 32
-#define get_descriptor_id(type, service) (((type - 4) << 4) | service)
+#define get_descriptor_id(type, service) (((type - 4) << 8) | service)
extern struct bus_type pcie_port_bus_type;
int pcie_port_device_register(struct pci_dev *dev);