From patchwork Mon Nov 5 12:51:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Subrahmanya Lingappa X-Patchwork-Id: 10668183 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C3D641709 for ; Mon, 5 Nov 2018 12:51:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B4BA829770 for ; Mon, 5 Nov 2018 12:51:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A807829773; Mon, 5 Nov 2018 12:51:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0EFD42976A for ; Mon, 5 Nov 2018 12:51:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729917AbeKEWL2 (ORCPT ); Mon, 5 Nov 2018 17:11:28 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:41045 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729015AbeKEWL2 (ORCPT ); Mon, 5 Nov 2018 17:11:28 -0500 Received: by mail-pl1-f196.google.com with SMTP id p16-v6so4425952plr.8 for ; Mon, 05 Nov 2018 04:51:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mobiveil.co.in; s=google; h=from:to:cc:subject:date:message-id; bh=61IM1BpJF7hP0Xm3lMelzTNjW0VhxJvVmEeUdyzQx18=; b=DmGUOSbOn5EsBORSGteAO4mn7aRiYH2vxN51jCbjfBhynZmwDh5d16YTOHSlspylhm nugxCrOJauCFVC9RJYxlHYp43NAuEgITjO35YTAFBZIxsVHw0hJWJsfW+p1raBmGlP9j hlCywhgpDk76dDShDsvNr7rkSG8CctbySqfBI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=61IM1BpJF7hP0Xm3lMelzTNjW0VhxJvVmEeUdyzQx18=; b=OUrGsAmZjyORSjHnc6ln9tJSAWtb8pOgbeeciQTgAXuLYMB15TX3IDNrEba2hj+RYc j2j35qd/rdJcuCGutcdGx0BY/HJIILC3rZzuejc0ggr/1KdjwteGvI07BWFk5Acgza+N DfrhcM6c+s5Gc7LFmdQ2IQSXClZKjXQfLXzdJvWErmrsvS6+G7njTLrKy+8cKiVKr2BW Nm0Jg9x34BFZEBnc49/iBSkM2elFpWYl7o98u4/d0aK7zgx6ebPMMXHRjNbbP1K1YOO9 vSK3vi5tnUrd1LS7tqyx+vGs076E4cUNGGrj2/ly5prL41ntWILRFu6iFpgnU9CFqeru CbAw== X-Gm-Message-State: AGRZ1gKaLbX2szsVOAquHtklDuqZ1PeuAfm6pmky1Rd6Qo4vFox9Ns/C YMyPaA3E7qAC6v5MCiKVC5ZhcdM2JYnpwA== X-Google-Smtp-Source: AJdET5ejy0emOGJ82xRaYQSmZZwU1H9DyAFZ/jyrFGzYsFTe2dAQeQZnNyTYiOhRmYxH0N68Bjetzw== X-Received: by 2002:a17:902:f209:: with SMTP id gn9mr21096464plb.6.1541422311402; Mon, 05 Nov 2018 04:51:51 -0800 (PST) Received: from localhost.localdomain.localdomain ([106.51.129.105]) by smtp.gmail.com with ESMTPSA id 144-v6sm38860034pfu.129.2018.11.05.04.51.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Nov 2018 04:51:50 -0800 (PST) From: Subrahmanya Lingappa To: linux-pci@vger.kernel.org, bhelgaas@google.com, lorenzo.pieralisi@arm.com Cc: Subrahmanya Lingappa Subject: [PATCH 1/1] PCI: mobiveil: fix multi function endpoint failures Date: Mon, 5 Nov 2018 07:51:40 -0500 Message-Id: <1541422301-29176-1-git-send-email-l.subrahmanya@mobiveil.co.in> X-Mailer: git-send-email 1.8.3.1 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The fix enables mobiveil pcie controller to detect more than one functions per device. Also increases the MSI interrupts. Fixes: 1e913e58335f ("PCI: mobiveil: Add MSI support") Fixes: 9af6bcb11e12 ("PCI: mobiveil: Add Mobiveil PCIe Host Bridge IP driver") Signed-off-by: Subrahmanya Lingappa --- drivers/pci/controller/pcie-mobiveil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/pcie-mobiveil.c b/drivers/pci/controller/pcie-mobiveil.c index 4d6c20e..113d56a 100644 --- a/drivers/pci/controller/pcie-mobiveil.c +++ b/drivers/pci/controller/pcie-mobiveil.c @@ -89,7 +89,7 @@ #define PAB_INTX_START 5 /* supported number of MSI interrupts */ -#define PCI_NUM_MSI 16 +#define PCI_NUM_MSI 256 /* MSI registers */ #define MSI_BASE_LO_OFFSET 0x04 @@ -172,7 +172,7 @@ static bool mobiveil_pcie_valid_device(struct pci_bus *bus, unsigned int devfn) * Do not read more than one device on the bus directly * attached to RC */ - if ((bus->primary == pcie->root_bus_nr) && (devfn > 0)) + if ((bus->number == pcie->root_bus_nr) && (devfn > 0)) return false; return true;