Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/591653/?format=api
{ "id": 591653, "url": "http://patchwork.ozlabs.org/api/patches/591653/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/1457049194-9281-6-git-send-email-gwshan@linux.vnet.ibm.com/", "project": { "id": 2, "url": "http://patchwork.ozlabs.org/api/projects/2/?format=api", "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": "<1457049194-9281-6-git-send-email-gwshan@linux.vnet.ibm.com>", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/1457049194-9281-6-git-send-email-gwshan@linux.vnet.ibm.com/", "date": "2016-03-03T23:53:07", "name": "[v15,05/12] powerpc/eeh: EEH device for VF", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "2560093b74c419230748e16c13ad1a47933aa2a2", "submitter": { "id": 63923, "url": "http://patchwork.ozlabs.org/api/people/63923/?format=api", "name": "Gavin Shan", "email": "gwshan@linux.vnet.ibm.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/1457049194-9281-6-git-send-email-gwshan@linux.vnet.ibm.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/591653/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/591653/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 AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id C8D371402B4\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 4 Mar 2016 11:03:26 +1100 (AEDT)", "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id AEB7E1A1748\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 4 Mar 2016 11:03:26 +1100 (AEDT)", "from e23smtp01.au.ibm.com (e23smtp01.au.ibm.com [202.81.31.143])\n\t(using TLSv1.2 with cipher CAMELLIA256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 27B6A1A0BA3\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tFri, 4 Mar 2016 10:54:41 +1100 (AEDT)", "from localhost\n\tby e23smtp01.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <linuxppc-dev@lists.ozlabs.org> from <gwshan@linux.vnet.ibm.com>; \n\tFri, 4 Mar 2016 09:54:40 +1000", "from d23dlp01.au.ibm.com (202.81.31.203)\n\tby e23smtp01.au.ibm.com (202.81.31.207) with IBM ESMTP SMTP Gateway:\n\tAuthorized Use Only! Violators will be prosecuted; \n\tFri, 4 Mar 2016 09:54:37 +1000", "from d23relay10.au.ibm.com (d23relay10.au.ibm.com [9.190.26.77])\n\tby d23dlp01.au.ibm.com (Postfix) with ESMTP id CC6272CE8059\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tFri, 4 Mar 2016 10:54:36 +1100 (EST)", "from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138])\n\tby d23relay10.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id\n\tu23NsSnR1507768\n\tfor <linuxppc-dev@lists.ozlabs.org>; Fri, 4 Mar 2016 10:54:36 +1100", "from d23av02.au.ibm.com (localhost [127.0.0.1])\n\tby d23av02.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id\n\tu23Ns46J026013\n\tfor <linuxppc-dev@lists.ozlabs.org>; Fri, 4 Mar 2016 10:54:04 +1100", "from ozlabs.au.ibm.com (ozlabs.au.ibm.com [9.192.253.14])\n\tby d23av02.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id\n\tu23Ns43O025696; Fri, 4 Mar 2016 10:54:04 +1100", "from bran.ozlabs.ibm.com (haven.au.ibm.com [9.192.254.114])\n\tby ozlabs.au.ibm.com (Postfix) with ESMTP id 10C96A026F;\n\tFri, 4 Mar 2016 10:53:17 +1100 (AEDT)", "from gwshan (shangw.ozlabs.ibm.com [10.61.2.199])\n\tby bran.ozlabs.ibm.com (Postfix) with ESMTP id 0D5D5E39EB;\n\tFri, 4 Mar 2016 10:53:17 +1100 (AEDT)", "by gwshan (Postfix, from userid 1000)\n\tid F121D9424AF; Fri, 4 Mar 2016 10:53:16 +1100 (AEDT)" ], "X-IBM-Helo": "d23dlp01.au.ibm.com", "X-IBM-MailFrom": "gwshan@linux.vnet.ibm.com", "X-IBM-RcptTo": "linuxppc-dev@lists.ozlabs.org", "From": "Gavin Shan <gwshan@linux.vnet.ibm.com>", "To": "linuxppc-dev@lists.ozlabs.org", "Subject": "[PATCH v15 05/12] powerpc/eeh: EEH device for VF", "Date": "Fri, 4 Mar 2016 10:53:07 +1100", "Message-Id": "<1457049194-9281-6-git-send-email-gwshan@linux.vnet.ibm.com>", "X-Mailer": "git-send-email 2.1.0", "In-Reply-To": "<1457049194-9281-1-git-send-email-gwshan@linux.vnet.ibm.com>", "References": "<1457049194-9281-1-git-send-email-gwshan@linux.vnet.ibm.com>", "X-TM-AS-MML": "disable", "X-Content-Scanned": "Fidelis XPS MAILER", "x-cbid": "16030323-1618-0000-0000-0000272603A6", "X-BeenThere": "linuxppc-dev@lists.ozlabs.org", "X-Mailman-Version": "2.1.20", "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": "Wei Yang <weiyang@linux.vnet.ibm.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "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": "From: Wei Yang <weiyang@linux.vnet.ibm.com>\n\nVFs and their corresponding pdn are created and released dynamically\nwhen their PF's SRIOV capability is enabled and disabled. This creates\nand releases EEH devices for VFs when creating and releasing their pdn\ninstances, which means EEH devices and pdn instances have same life\ncycle. Also, VF's EEH device is identified by (struct eeh_dev::physfn).\n\nSigned-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>\nAcked-by: Gavin Shan <gwshan@linux.vnet.ibm.com>\n---\n arch/powerpc/include/asm/eeh.h | 1 +\n arch/powerpc/kernel/pci_dn.c | 15 +++++++++++++++\n 2 files changed, 16 insertions(+)", "diff": "diff --git a/arch/powerpc/include/asm/eeh.h b/arch/powerpc/include/asm/eeh.h\nindex 867c39b..574ed49a 100644\n--- a/arch/powerpc/include/asm/eeh.h\n+++ b/arch/powerpc/include/asm/eeh.h\n@@ -141,6 +141,7 @@ struct eeh_dev {\n \tstruct pci_controller *phb;\t/* Associated PHB\t\t*/\n \tstruct pci_dn *pdn;\t\t/* Associated PCI device node\t*/\n \tstruct pci_dev *pdev;\t\t/* Associated PCI device\t*/\n+\tstruct pci_dev *physfn;\t\t/* Associated SRIOV PF\t\t*/\n \tstruct pci_bus *bus;\t\t/* PCI bus for partial hotplug\t*/\n };\n \ndiff --git a/arch/powerpc/kernel/pci_dn.c b/arch/powerpc/kernel/pci_dn.c\nindex b3b4df9..e23bdf7 100644\n--- a/arch/powerpc/kernel/pci_dn.c\n+++ b/arch/powerpc/kernel/pci_dn.c\n@@ -179,6 +179,7 @@ struct pci_dn *add_dev_pci_data(struct pci_dev *pdev)\n {\n #ifdef CONFIG_PCI_IOV\n \tstruct pci_dn *parent, *pdn;\n+\tstruct eeh_dev *edev;\n \tint i;\n \n \t/* Only support IOV for now */\n@@ -204,6 +205,12 @@ struct pci_dn *add_dev_pci_data(struct pci_dev *pdev)\n \t\t\t\t __func__, i);\n \t\t\treturn NULL;\n \t\t}\n+\n+\t\t/* Create the EEH device for the VF */\n+\t\teeh_dev_init(pdn, pci_bus_to_host(pdev->bus));\n+\t\tedev = pdn_to_eeh_dev(pdn);\n+\t\tBUG_ON(!edev);\n+\t\tedev->physfn = pdev;\n \t}\n #endif /* CONFIG_PCI_IOV */\n \n@@ -215,6 +222,7 @@ void remove_dev_pci_data(struct pci_dev *pdev)\n #ifdef CONFIG_PCI_IOV\n \tstruct pci_dn *parent;\n \tstruct pci_dn *pdn, *tmp;\n+\tstruct eeh_dev *edev;\n \tint i;\n \n \t/*\n@@ -256,6 +264,13 @@ void remove_dev_pci_data(struct pci_dev *pdev)\n \t\t\t pdn->devfn != pci_iov_virtfn_devfn(pdev, i))\n \t\t\t\tcontinue;\n \n+\t\t\t/* Release EEH device for the VF */\n+\t\t\tedev = pdn_to_eeh_dev(pdn);\n+\t\t\tif (edev) {\n+\t\t\t\tpdn->edev = NULL;\n+\t\t\t\tkfree(edev);\n+\t\t\t}\n+\n \t\t\tif (!list_empty(&pdn->list))\n \t\t\t\tlist_del(&pdn->list);\n \n", "prefixes": [ "v15", "05/12" ] }