From patchwork Thu Dec 8 21:30:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Gospodarek X-Patchwork-Id: 704241 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 3tZT6w3n3pz9s3T for ; Fri, 9 Dec 2016 08:30:32 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=broadcom.com header.i=@broadcom.com header.b="iZkxeZUU"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753170AbcLHVab (ORCPT ); Thu, 8 Dec 2016 16:30:31 -0500 Received: from lpdvsmtp01.broadcom.com ([192.19.211.62]:41412 "EHLO relay.smtp.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753010AbcLHVaa (ORCPT ); Thu, 8 Dec 2016 16:30:30 -0500 Received: from mail-irv-17.broadcom.com (smtphost.broadcom.com [10.15.198.34]) by relay.smtp.broadcom.com (Postfix) with ESMTP id 1904D280319; Thu, 8 Dec 2016 13:30:27 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 relay.smtp.broadcom.com 1904D280319 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1481232627; bh=vxrAcSR/DwDdZNbKTviQerhhqnr/sUGKxX0TUsHHoUI=; h=From:To:Cc:Subject:Date:From; b=iZkxeZUUr0vF0gvS0oDgowY4KBpX8XDNNsstHdBOfC+NiTun6sBQAN9sR/QSqsUg5 sEtPrmil6VPRqY3F7m8x/A3yeJrq+QM75X0nBtz8R12qDUREiSWZ0pkQVlPDS+4L8T iC5EB6r6IltqzHEdchBhUFzb2fOrwG6AFEOyaSqE= Received: from xl-rtp-02.broadcom.com (xl-rtp-02.rtp.broadcom.com [10.27.128.235]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id 34A948202A; Thu, 8 Dec 2016 13:30:26 -0800 (PST) Received: by xl-rtp-02.broadcom.com (Postfix, from userid 113978) id 8A5084C07E1; Thu, 8 Dec 2016 16:30:25 -0500 (EST) From: Andy Gospodarek To: bhelgaas@google.com, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, ray.jui@broadcom.com Cc: Andy Gospodarek Subject: [PATCH pci/host-iproc] PCI: iproc: Allow more than slot 0 on PAXC Date: Thu, 8 Dec 2016 16:30:18 -0500 Message-Id: <1481232618-10614-1-git-send-email-gospo@broadcom.com> X-Mailer: git-send-email 2.1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org The iproc host driver limits the number of slots that are available on PAXC devices. Enforcing this limit prevents VFs from being created beyond the first port. After this change it is possible to create VFs associated with all four devices. The first four devices below are the PFs and the next four are the newly created VFs: 0008:01:00.0 Ethernet controller: Broadcom Limited Device 16cd 0008:01:00.1 Ethernet controller: Broadcom Limited Device 16cd 0008:01:00.2 Ethernet controller: Broadcom Limited Device 16cd 0008:01:00.3 Ethernet controller: Broadcom Limited Device 16cd 0008:01:00.4 Ethernet controller: Broadcom Limited BCM57304 NetXtreme-C Ethernet Virtual Function 0008:01:01.0 Ethernet controller: Broadcom Limited BCM57304 NetXtreme-C Ethernet Virtual Function 0008:01:01.4 Ethernet controller: Broadcom Limited BCM57304 NetXtreme-C Ethernet Virtual Function 0008:01:02.0 Ethernet controller: Broadcom Limited BCM57304 NetXtreme-C Ethernet Virtual Function Based on the git history around 923c6bb1f641 ("PCI: iproc: Allow multiple devices except on PAXC") and 943ebae781f5 ("PCI: iproc: Add PAXC interface support") I expect there may be an unmentioned or unknown-to-me reason why this code exists. I certainly cannot create and use VFs without some kind of change around this space, so I would like to see the current limitation simply removed. Fixes: 923c6bb1f641 ("PCI: iproc: Allow multiple devices except on PAXC") Signed-off-by: Andy Gospodarek --- drivers/pci/host/pcie-iproc.c | 8 -------- 1 file changed, 8 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pci/host/pcie-iproc.c b/drivers/pci/host/pcie-iproc.c index 3ebc025..9311826 100644 --- a/drivers/pci/host/pcie-iproc.c +++ b/drivers/pci/host/pcie-iproc.c @@ -477,14 +477,6 @@ static void __iomem *iproc_pcie_map_cfg_bus(struct pci_bus *bus, return (pcie->base + offset); } - /* - * PAXC is connected to an internally emulated EP within the SoC. It - * allows only one device. - */ - if (pcie->ep_is_internal) - if (slot > 0) - return NULL; - /* EP device access */ val = (busno << CFG_ADDR_BUS_NUM_SHIFT) | (slot << CFG_ADDR_DEV_NUM_SHIFT) |