From: Keith Busch Date: Wed, 6 Jul 2016 16:06:00 +0000 (-0600) Subject: PCI: Bind DPC to Root Ports as well as Downstream Ports X-Git-Tag: v5.15~13118^2~5^3~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7e16fd6df178d3395d32c7d325df69062ea6e024;p=platform%2Fkernel%2Flinux-starfive.git PCI: Bind DPC to Root Ports as well as Downstream Ports 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 Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas CC: Mika Westerberg --- diff --git a/drivers/pci/pcie/pcie-dpc.c b/drivers/pci/pcie/pcie-dpc.c index fcd1943..250f878 100644 --- a/drivers/pci/pcie/pcie-dpc.c +++ b/drivers/pci/pcie/pcie-dpc.c @@ -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,