{"id":817548,"url":"http://patchwork.ozlabs.org/api/patches/817548/?format=json","web_url":"http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20170922141928.49141-3-bryantly@linux.vnet.ibm.com/","project":{"id":2,"url":"http://patchwork.ozlabs.org/api/projects/2/?format=json","name":"Linux PPC development","link_name":"linuxppc-dev","list_id":"linuxppc-dev.lists.ozlabs.org","list_email":"linuxppc-dev@lists.ozlabs.org","web_url":"https://github.com/linuxppc/wiki/wiki","scm_url":"https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git","webscm_url":"https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/","list_archive_url":"https://lore.kernel.org/linuxppc-dev/","list_archive_url_format":"https://lore.kernel.org/linuxppc-dev/{}/","commit_url_format":"https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}"},"msgid":"<20170922141928.49141-3-bryantly@linux.vnet.ibm.com>","list_archive_url":"https://lore.kernel.org/linuxppc-dev/20170922141928.49141-3-bryantly@linux.vnet.ibm.com/","date":"2017-09-22T14:19:28","name":"[v3,2/2] pseries/eeh: Add Pseries pcibios_bus_add_device","commit_ref":null,"pull_url":null,"state":"superseded","archived":true,"hash":"b2c6176b7bc42d71de56fac3f5a604d2ee6e289c","submitter":{"id":72247,"url":"http://patchwork.ozlabs.org/api/people/72247/?format=json","name":"Bryant G. Ly","email":"bryantly@linux.vnet.ibm.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20170922141928.49141-3-bryantly@linux.vnet.ibm.com/mbox/","series":[{"id":4644,"url":"http://patchwork.ozlabs.org/api/series/4644/?format=json","web_url":"http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=4644","date":"2017-09-22T14:19:27","name":"Prepartion for SR-IOV PowerVM Enablement","version":3,"mbox":"http://patchwork.ozlabs.org/series/4644/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/817548/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/817548/checks/","tags":{},"related":[],"headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xzG1M2RDCz9t16\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat, 23 Sep 2017 00:23:35 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xzG1M1bJYzDsPl\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat, 23 Sep 2017 00:23:35 +1000 (AEST)","from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com\n\t[148.163.158.5])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xzFwr5NM4zDrGy\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tSat, 23 Sep 2017 00:19:40 +1000 (AEST)","from pps.filterd (m0098414.ppops.net [127.0.0.1])\n\tby mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv8MEGQNq110324\n\tfor <linuxppc-dev@lists.ozlabs.org>; Fri, 22 Sep 2017 10:19:38 -0400","from e38.co.us.ibm.com (e38.co.us.ibm.com [32.97.110.159])\n\tby mx0b-001b2d01.pphosted.com with ESMTP id 2d50ac8nrp-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <linuxppc-dev@lists.ozlabs.org>; Fri, 22 Sep 2017 10:19:38 -0400","from localhost\n\tby e38.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <linuxppc-dev@lists.ozlabs.org> from\n\t<bryantly@linux.vnet.ibm.com>; Fri, 22 Sep 2017 08:19:37 -0600","from b03cxnp07028.gho.boulder.ibm.com (9.17.130.15)\n\tby e38.co.us.ibm.com (192.168.1.138) with IBM ESMTP SMTP Gateway:\n\tAuthorized Use Only! Violators will be prosecuted; \n\tFri, 22 Sep 2017 08:19:34 -0600","from b03ledav006.gho.boulder.ibm.com\n\t(b03ledav006.gho.boulder.ibm.com [9.17.130.237])\n\tby b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with\n\tESMTP id v8MEJYOx4129222; Fri, 22 Sep 2017 07:19:34 -0700","from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id 20237C6042;\n\tFri, 22 Sep 2017 08:19:34 -0600 (MDT)","from bryants-mbp-3.rchland.ibm.com (unknown [9.10.79.180])\n\tby b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP id ADB18C6043;\n\tFri, 22 Sep 2017 08:19:33 -0600 (MDT)"],"Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=linux.vnet.ibm.com\n\t(client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com;\n\tenvelope-from=bryantly@linux.vnet.ibm.com; receiver=<UNKNOWN>)","From":"\"Bryant G. Ly\" <bryantly@linux.vnet.ibm.com>","To":"bhelgaas@google.com, benh@kernel.crashing.org, paulus@samba.org,\n\tmpe@ellerman.id.au","Subject":"[PATCH v3 2/2] pseries/eeh: Add Pseries pcibios_bus_add_device","Date":"Fri, 22 Sep 2017 09:19:28 -0500","X-Mailer":"git-send-email 2.11.0 (Apple Git-81)","In-Reply-To":"<20170922141928.49141-1-bryantly@linux.vnet.ibm.com>","References":"<20170922141928.49141-1-bryantly@linux.vnet.ibm.com>","X-TM-AS-GCONF":"00","x-cbid":"17092214-0028-0000-0000-000008658CD7","X-IBM-SpamModules-Scores":"","X-IBM-SpamModules-Versions":"BY=3.00007778; HX=3.00000241; KW=3.00000007;\n\tPH=3.00000004; SC=3.00000231; SDB=6.00920741; UDB=6.00462685;\n\tIPR=6.00700962; \n\tBA=6.00005601; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009;\n\tZB=6.00000000; \n\tZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017249;\n\tXFM=3.00000015; UTC=2017-09-22 14:19:36","X-IBM-AV-DETECTION":"SAVI=unused REMOTE=unused XFE=unused","x-cbparentid":"17092214-0029-0000-0000-000037A7CBA8","Message-Id":"<20170922141928.49141-3-bryantly@linux.vnet.ibm.com>","X-Proofpoint-Virus-Version":"vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-09-22_05:, , signatures=0","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=0\n\tmalwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam\n\tadjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000\n\tdefinitions=main-1709220200","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.24","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"linux-pci@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,\n\tseroyer@linux.vnet.ibm.com,\n\t\"Bryant G. Ly\" <bryantly@linux.vnet.ibm.com>, \n\t\"Juan J . Alvarez\" <jjalvare@us.ibm.com>","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"},"content":"This patch adds the machine dependent call for\npcibios_bus_add_device, since the previous patch\nseparated the calls out between the PowerNV and PowerVM.\n\nThe difference here is that for the PowerVM environment\nwe do not want match_driver set because in this environment\nwe do not want the VF device drivers to load immediately, due to\nfirmware loading the device node when VF device is assigned to the\nlogical partition.\n\nThis patch will depend on the patch linked below, which is under\nreview.\n\nhttps://patchwork.kernel.org/patch/9882915/\n\nSigned-off-by: Bryant G. Ly <bryantly@linux.vnet.ibm.com>\nSigned-off-by: Juan J. Alvarez <jjalvare@us.ibm.com>\n---\n arch/powerpc/platforms/pseries/eeh_pseries.c | 24 ++++++++++++++++++++++++\n 1 file changed, 24 insertions(+)","diff":"diff --git a/arch/powerpc/platforms/pseries/eeh_pseries.c b/arch/powerpc/platforms/pseries/eeh_pseries.c\nindex 6b812ad990e4..45946ee90985 100644\n--- a/arch/powerpc/platforms/pseries/eeh_pseries.c\n+++ b/arch/powerpc/platforms/pseries/eeh_pseries.c\n@@ -64,6 +64,27 @@ static unsigned char slot_errbuf[RTAS_ERROR_LOG_MAX];\n static DEFINE_SPINLOCK(slot_errbuf_lock);\n static int eeh_error_buf_size;\n \n+void pseries_pcibios_bus_add_device(struct pci_dev *pdev)\n+{\n+\tstruct pci_dn *pdn = pci_get_pdn(pdev);\n+\n+\tif (!pdev->is_virtfn)\n+\t\treturn;\n+\n+\tpdn->device_id  =  pdev->device;\n+\tpdn->vendor_id  =  pdev->vendor;\n+\tpdn->class_code =  pdev->class;\n+\n+\t/*\n+\t * The following operations will fail if VF's sysfs files\n+\t * aren't created or its resources aren't finalized.\n+\t */\n+\teeh_add_device_early(pdn);\n+\teeh_add_device_late(pdev);\n+\teeh_sysfs_add_device(pdev);\n+\tpdev->match_driver = -1;\n+}\n+\n /**\n  * pseries_eeh_init - EEH platform dependent initialization\n  *\n@@ -120,6 +141,9 @@ static int pseries_eeh_init(void)\n \t/* Set EEH probe mode */\n \teeh_add_flag(EEH_PROBE_MODE_DEVTREE | EEH_ENABLE_IO_FOR_LOG);\n \n+\t/* Set EEH machine dependent code */\n+\tppc_md.pcibios_bus_add_device = pseries_pcibios_bus_add_device;\n+\n \treturn 0;\n }\n \n","prefixes":["v3","2/2"]}