From patchwork Tue Oct 9 11:08:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Subrahmanya Lingappa X-Patchwork-Id: 10632247 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 81CC317E3 for ; Tue, 9 Oct 2018 11:09:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 64A17289FB for ; Tue, 9 Oct 2018 11:09:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 58A7028A04; Tue, 9 Oct 2018 11:09:13 +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 C5FEB289FC for ; Tue, 9 Oct 2018 11:09:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726160AbeJISZg (ORCPT ); Tue, 9 Oct 2018 14:25:36 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:43779 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726103AbeJISZg (ORCPT ); Tue, 9 Oct 2018 14:25:36 -0400 Received: by mail-pf1-f195.google.com with SMTP id p24-v6so660444pff.10 for ; Tue, 09 Oct 2018 04:09:11 -0700 (PDT) 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=iktkOPRJRG/9vk7dBQ/emNVYe1ASjRafz2HXqXPdIy8=; b=CFOtkKLBnSWyMkz/7RebblDe2Uvq0rZslwkBaDWMptNNO3YO6DEuKW0Uw45fBqUD+S uB1bfDBrFYyRCjtfhX+VtqAShs7f8qdJm3VfttQzrexhyXcjt/k9LfBm5JmGvhqbPBQ/ aXZUi0TqbltpQPMNouFTn030jsnBnVe811DVI= 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=iktkOPRJRG/9vk7dBQ/emNVYe1ASjRafz2HXqXPdIy8=; b=pyD9dx95hNWvs/4oKCFp1Gnw0DY5lKJ2WyYPIlDKe/TIEgDyhoHMB2Q1sihQ6rVW+j X7VkPEnRrpX0HYZRfj9U8DmxSKT5qBHDPVUdzLcyVzCK0GfJXCARsykr4sbw8Q6jhrWu +KIa5m+2hLRkDvonI6i0wX+brc0LABrkZNNmxcgXyMPknStKNZ/aMqOKgaHvl1xcp5BD poMXnNasChrUlZO7oKTyOm4QIfDhn568BAfzbzULflVqNENEhIsMOIVuinm6uHbF2vNo lXlKaoOHz8IwBCrB+27tFMvgC07Kf0hpIPirTZu0QBKIsKLE1yG5RaFxbmqX+0BD8StO oErQ== X-Gm-Message-State: ABuFfogDbwJWA1okHDx9AHlOAnVwc7nCYEX+LUWwM5k0kqL7+brU5ROR GXyGM2tjRyLw/VO3OejU2iNp6Y5ZEC1XXw== X-Google-Smtp-Source: ACcGV6340r+n3ESv21eCT20SV5nX8CKI1EBBErF5GeZiZ9yksW4z4KCRzZuTvXFU2hhBkyj/Y4iyPg== X-Received: by 2002:a63:2356:: with SMTP id u22-v6mr16394519pgm.122.1539083350734; Tue, 09 Oct 2018 04:09:10 -0700 (PDT) Received: from localhost.localdomain.localdomain ([106.51.129.105]) by smtp.gmail.com with ESMTPSA id m15-v6sm47895706pfk.149.2018.10.09.04.09.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Oct 2018 04:09:09 -0700 (PDT) From: Subrahmanya Lingappa To: linux-pci@vger.kernel.org, bhelgaas@google.com, lorenzo.pieralisi@arm.com Cc: Subrahmanya Lingappa Subject: [PATCH] PCI:mobiveil: fix multi function endpoint failures Date: Tue, 9 Oct 2018 07:08:45 -0400 Message-Id: <1539083325-7333-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. Signed-off-by: Subrahmanya Lingappa --- drivers/pci/controller/pcie-mobiveil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/controller/pcie-mobiveil.c b/drivers/pci/controller/pcie-mobiveil.c index a939e8d3..9acb81a 100644 --- a/drivers/pci/controller/pcie-mobiveil.c +++ b/drivers/pci/controller/pcie-mobiveil.c @@ -174,7 +174,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;