linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] pcie/dpc: Match any port type
@ 2016-07-06 16:06 Keith Busch
  2016-07-06 16:06 ` [PATCH 2/2] pcie/dpc: Remove tristate module option Keith Busch
  2016-07-25 17:51 ` [PATCH 1/2] pcie/dpc: Match any port type Bjorn Helgaas
  0 siblings, 2 replies; 3+ messages in thread
From: Keith Busch @ 2016-07-06 16:06 UTC (permalink / raw)
  To: linux-pci, Bjorn Helgaas; +Cc: Keith Busch, Mika Westerberg

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. This patch changes
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 probe them
since these are not DPC capable.

Reported-by: Alexander Antonov <alexanderx.v.antonov@intel.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
---
 drivers/pci/pcie/pcie-dpc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/pcie/pcie-dpc.c b/drivers/pci/pcie/pcie-dpc.c
index ab552f1..0b36525 100644
--- a/drivers/pci/pcie/pcie-dpc.c
+++ b/drivers/pci/pcie/pcie-dpc.c
@@ -138,7 +138,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,
-- 
2.7.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-07-25 17:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-06 16:06 [PATCH 1/2] pcie/dpc: Match any port type Keith Busch
2016-07-06 16:06 ` [PATCH 2/2] pcie/dpc: Remove tristate module option Keith Busch
2016-07-25 17:51 ` [PATCH 1/2] pcie/dpc: Match any port type Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).