Skip to content

Commit

Permalink
PCI: Bind DPC to Root Ports as well as Downstream Ports
Browse files Browse the repository at this point in the history
PCIe port type values are not flags, so OR'ing them is not correct.
Previously the result was equivalent to PCIe Downstream Ports, so we were
missing binding to DPC-capable Root Ports.

Change the type to 'any' so we can bind to both port types.  While this
will cause the code to check Upstream Ports, the driver won't claim them
since they are not DPC-capable.

Reported-by: Alexander Antonov <alexanderx.v.antonov@intel.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
CC: Mika Westerberg <mika.westerberg@linux.intel.com>
  • Loading branch information
Keith Busch authored and Bjorn Helgaas committed Jul 25, 2016
1 parent 14a16d5 commit 7e16fd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pci/pcie/pcie-dpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ static void dpc_remove(struct pcie_device *dev)

static struct pcie_port_service_driver dpcdriver = {
.name = "dpc",
.port_type = PCI_EXP_TYPE_ROOT_PORT | PCI_EXP_TYPE_DOWNSTREAM,
.port_type = PCIE_ANY_PORT,
.service = PCIE_PORT_SERVICE_DPC,
.probe = dpc_probe,
.remove = dpc_remove,
Expand Down

0 comments on commit 7e16fd6

Please sign in to comment.