From patchwork Wed Jul 6 16:06:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keith Busch X-Patchwork-Id: 645392 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3rl5GM0YvSz9sBm for ; Thu, 7 Jul 2016 02:06:19 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754535AbcGFQGR (ORCPT ); Wed, 6 Jul 2016 12:06:17 -0400 Received: from mga03.intel.com ([134.134.136.65]:48056 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754446AbcGFQGR (ORCPT ); Wed, 6 Jul 2016 12:06:17 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP; 06 Jul 2016 09:06:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,319,1464678000"; d="scan'208";a="1016697971" Received: from dcgshare.lm.intel.com ([10.232.118.254]) by fmsmga002.fm.intel.com with ESMTP; 06 Jul 2016 09:06:03 -0700 Received: by dcgshare.lm.intel.com (Postfix, from userid 1017) id D6924E0C74; Wed, 6 Jul 2016 10:06:02 -0600 (MDT) From: Keith Busch To: linux-pci@vger.kernel.org, Bjorn Helgaas Cc: Keith Busch , Mika Westerberg Subject: [PATCH 1/2] pcie/dpc: Match any port type Date: Wed, 6 Jul 2016 10:06:00 -0600 Message-Id: <1467821161-25458-1-git-send-email-keith.busch@intel.com> X-Mailer: git-send-email 1.7.1 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org 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 Signed-off-by: Keith Busch Cc: Mika Westerberg --- 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,