From patchwork Mon May 14 15:06:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Pimentel X-Patchwork-Id: 913019 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-pci-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=synopsys.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=synopsys.com header.i=@synopsys.com header.b="LESwyQrU"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 40l3v95y3Bz9s0q for ; Tue, 15 May 2018 01:06:45 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753296AbeENPGo (ORCPT ); Mon, 14 May 2018 11:06:44 -0400 Received: from smtprelay.synopsys.com ([198.182.37.59]:37929 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752787AbeENPGn (ORCPT ); Mon, 14 May 2018 11:06:43 -0400 Received: from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238]) by smtprelay.synopsys.com (Postfix) with ESMTP id 700441E044E for ; Mon, 14 May 2018 17:06:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1526310402; bh=rlnTJOQDltiNJZiYjdZ1ixmE0kjanikR5aZPOsE2xDE=; h=From:To:Cc:Subject:Date:From; b=LESwyQrUkYWoJa/3dHlnI74KFxaIRCTytGdnHMm8wt95jO+1CM6J2gRbvY/NfMIlG o4t2phPtNp8uglrxUhQtlRuBqTXxDM0GrYSl7VJleKQnIdEsfEVwZhuU0skd50ze5e 1toOMWK0wrZX8skmBTG8CdnTawuTlq37aZIDg3aLhIYuTYuNWOzXHG2A49j35PlB2e R9T2Mv5bE/K0BHyF0wv1SJkNojFF8WqVG6z22oi9lu+au3s4qow5+Yvn6LBwy9he9q Xuaw69ABMuWvwHjR30FK95xPjumlMPRFCMhFggImG8/qnxnHh5Padb+vpzsXGmCszX Hxcf4uJMc4HAQ== Received: from pt02.synopsys.com (pt02.synopsys.com [10.107.23.240]) by mailhost.synopsys.com (Postfix) with ESMTP id 8FE3D3B24; Mon, 14 May 2018 08:06:41 -0700 (PDT) Received: from UbuntuMate-64Bits.internal.synopsys.com (gustavo-e7480.internal.synopsys.com [10.107.25.102]) by pt02.synopsys.com (Postfix) with ESMTP id E7FFC3EDE5; Mon, 14 May 2018 16:06:40 +0100 (WEST) From: Gustavo Pimentel To: bhelgaas@google.com, lorenzo.pieralisi@arm.com, Joao.Pinto@synopsys.com, jingoohan1@gmail.com Cc: linux-pci@vger.kernel.org, Gustavo Pimentel Subject: [PATCH] PCI: dwc: Define maximum number of vectors Date: Mon, 14 May 2018 16:06:33 +0100 Message-Id: X-Mailer: git-send-email 2.7.4 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Add a callback to define the maximum number of vectors used by the RC. Since this is a parameter associated to each SoC IP setting, makes sense to be configurable and easily visible to future modifications. Set DesignWare driver vectors number maximum to 256. Signed-off-by: Gustavo Pimentel Acked-by: Joao Pinto Acked-by: Jingoo Han --- drivers/pci/dwc/pcie-designware-plat.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/pci/dwc/pcie-designware-plat.c b/drivers/pci/dwc/pcie-designware-plat.c index 5416aa8..80a2782 100644 --- a/drivers/pci/dwc/pcie-designware-plat.c +++ b/drivers/pci/dwc/pcie-designware-plat.c @@ -38,8 +38,14 @@ static int dw_plat_pcie_host_init(struct pcie_port *pp) return 0; } +static void dw_plat_set_num_vectors(struct pcie_port *pp) +{ + pp->num_vectors = MAX_MSI_IRQS; +} + static const struct dw_pcie_host_ops dw_plat_pcie_host_ops = { .host_init = dw_plat_pcie_host_init, + .set_num_vectors = dw_plat_set_num_vectors, }; static int dw_plat_add_pcie_port(struct pcie_port *pp,