From patchwork Thu Jan 28 23:37:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ray Jui X-Patchwork-Id: 8155091 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 863EBBEEE5 for ; Thu, 28 Jan 2016 23:37:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B37F22021B for ; Thu, 28 Jan 2016 23:37:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D1A1620328 for ; Thu, 28 Jan 2016 23:37:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751130AbcA1Xh0 (ORCPT ); Thu, 28 Jan 2016 18:37:26 -0500 Received: from mail-gw3-out.broadcom.com ([216.31.210.64]:41864 "EHLO mail-gw3-out.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750824AbcA1Xh0 (ORCPT ); Thu, 28 Jan 2016 18:37:26 -0500 X-IronPort-AV: E=Sophos;i="5.22,360,1449561600"; d="scan'208";a="86449790" Received: from irvexchcas08.broadcom.com (HELO IRVEXCHCAS08.corp.ad.broadcom.com) ([10.9.208.57]) by mail-gw3-out.broadcom.com with ESMTP; 28 Jan 2016 16:18:08 -0800 Received: from IRVEXCHSMTP1.corp.ad.broadcom.com (10.9.207.51) by IRVEXCHCAS08.corp.ad.broadcom.com (10.9.208.57) with Microsoft SMTP Server (TLS) id 14.3.235.1; Thu, 28 Jan 2016 15:37:24 -0800 Received: from mail-irva-13.broadcom.com (10.10.10.20) by IRVEXCHSMTP1.corp.ad.broadcom.com (10.9.207.51) with Microsoft SMTP Server id 14.3.235.1; Thu, 28 Jan 2016 15:37:24 -0800 Received: from mail.broadcom.com (unknown [10.136.8.49]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id D52F840FE5; Thu, 28 Jan 2016 15:33:29 -0800 (PST) From: Ray Jui To: Bjorn Helgaas CC: Bjorn Helgaas , Rafal Milecki , Hante Meuleman , Hauke Mehrtens , , , , Ray Jui Subject: [PATCH] PCI: iproc: Remove redundant function number check for PAXC Date: Thu, 28 Jan 2016 15:37:20 -0800 Message-ID: <1454024240-12270-1-git-send-email-rjui@broadcom.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch removes the conditional check that limits the number of functions to be supported by the internally emulated endpoint device connected to PAXC. Investigation shows that the emulated PAXC endpoint device can properly reject request for unsupported functions, which makes this conditional check redundant Signed-off-by: Ray Jui --- drivers/pci/host/pcie-iproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/host/pcie-iproc.c b/drivers/pci/host/pcie-iproc.c index 9ae43ed..b65185d 100644 --- a/drivers/pci/host/pcie-iproc.c +++ b/drivers/pci/host/pcie-iproc.c @@ -204,7 +204,7 @@ static void __iomem *iproc_pcie_map_cfg_bus(struct pci_bus *bus, * allows only one device and supports a limited number of functions. */ if (pcie->type == IPROC_PCIE_PAXC) - if (slot > 0 || fn >= MAX_NUM_PAXC_PF) + if (slot > 0) return NULL; /* EP device access */