From patchwork Mon Sep 18 19:26:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Bryant G. Ly" X-Patchwork-Id: 9957493 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.web.codeaurora.org (Postfix) with ESMTP id C928760385 for ; Mon, 18 Sep 2017 19:27:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BBC4E288E1 for ; Mon, 18 Sep 2017 19:27:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B0B7C288F3; Mon, 18 Sep 2017 19:27:32 +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=-6.9 required=2.0 tests=BAYES_00,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 5267E288E1 for ; Mon, 18 Sep 2017 19:27:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750990AbdIRT1b (ORCPT ); Mon, 18 Sep 2017 15:27:31 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:56302 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750868AbdIRT1a (ORCPT ); Mon, 18 Sep 2017 15:27:30 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v8IJOT1u074173 for ; Mon, 18 Sep 2017 15:27:30 -0400 Received: from e12.ny.us.ibm.com (e12.ny.us.ibm.com [129.33.205.202]) by mx0a-001b2d01.pphosted.com with ESMTP id 2d2hacjph9-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 18 Sep 2017 15:27:29 -0400 Received: from localhost by e12.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 18 Sep 2017 15:27:28 -0400 Received: from b01cxnp22036.gho.pok.ibm.com (9.57.198.26) by e12.ny.us.ibm.com (146.89.104.199) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 18 Sep 2017 15:27:25 -0400 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v8IJRO9x48038106; Mon, 18 Sep 2017 19:27:24 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5B15812403D; Mon, 18 Sep 2017 15:24:41 -0400 (EDT) Received: from bryants-mbp-3.rchland.ibm.com (unknown [9.10.79.138]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP id E5010124035; Mon, 18 Sep 2017 15:24:40 -0400 (EDT) From: "Bryant G. Ly" To: bhelgaas@google.com, benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au Cc: linux-pci@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, "Bryant G. Ly" , "Juan J . Alvarez" Subject: [PATCH v1 2/3] pseries: Override pci_bus_match_virtfn_driver Date: Mon, 18 Sep 2017 14:26:50 -0500 X-Mailer: git-send-email 2.11.0 (Apple Git-81) In-Reply-To: <20170918192651.78404-1-bryantly@linux.vnet.ibm.com> References: <20170918192651.78404-1-bryantly@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 17091819-0048-0000-0000-000001E72726 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007757; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000230; SDB=6.00918923; UDB=6.00461645; IPR=6.00699151; BA=6.00005595; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017199; XFM=3.00000015; UTC=2017-09-18 19:27:27 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17091819-0049-0000-0000-0000429A36F3 Message-Id: <20170918192651.78404-3-bryantly@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-09-18_08:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1709180274 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 For Powervm SR-IOV (Pseries) enablement we dont want to match the virtual function's device drivers since firmware plans to load the device node in the device tree dynamically when Novalink assigns the VF to a partition. Signed-off-by: Bryant G. Ly Signed-off-by: Juan J. Alvarez --- arch/powerpc/platforms/pseries/pci.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/powerpc/platforms/pseries/pci.c b/arch/powerpc/platforms/pseries/pci.c index 09eba5a9929a..15d5145a622d 100644 --- a/arch/powerpc/platforms/pseries/pci.c +++ b/arch/powerpc/platforms/pseries/pci.c @@ -58,6 +58,23 @@ void pcibios_name_device(struct pci_dev *dev) DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pcibios_name_device); #endif +#ifdef CONFIG_PCI_IOV +void pci_bus_match_virtfn_driver(struct pci_dev *dev) +{ + /* + * Per PSeries SR-IOV requirement there is no need to + * match virtual function device driver as firmware + * will load the device node in the device tree dynamically. + * Since there is no matching of device driver there is + * no failure when attaching driver, therefore there is no + * need to remove sysfs file. Furthermore, the VF platform + * management still needs to exist in sysfs files to be used + * by management. + */ + dev->is_added = 1; +} +#endif + static void __init pSeries_request_regions(void) { if (!isa_io_base)