Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/675282/?format=api
{ "id": 675282, "url": "http://patchwork.ozlabs.org/api/patches/675282/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20160926182917.27531-7-paul.burton@imgtec.com/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api", "name": "U-Boot", "link_name": "uboot", "list_id": "u-boot.lists.denx.de", "list_email": "u-boot@lists.denx.de", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20160926182917.27531-7-paul.burton@imgtec.com>", "list_archive_url": null, "date": "2016-09-26T18:29:00", "name": "[U-Boot,06/23] pci: Set of_offset for devices not probed via DT compatible strings", "commit_ref": null, "pull_url": null, "state": "deferred", "archived": false, "hash": "f494bc298e2280b1c2d6a30a40c6ccbc1f8de81a", "submitter": { "id": 33698, "url": "http://patchwork.ozlabs.org/api/people/33698/?format=api", "name": "Paul Burton", "email": "paul.burton@imgtec.com" }, "delegate": { "id": 4307, "url": "http://patchwork.ozlabs.org/api/users/4307/?format=api", "username": "danielschwierzeck", "first_name": "Daniel", "last_name": "Schwierzeck", "email": "daniel.schwierzeck@googlemail.com" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20160926182917.27531-7-paul.burton@imgtec.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/675282/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/675282/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Received": [ "from theia.denx.de (theia.denx.de [85.214.87.163])\n\tby ozlabs.org (Postfix) with ESMTP id 3sjXbz61pJz9s3T\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 27 Sep 2016 04:31:27 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id 4D08EA7580;\n\tMon, 26 Sep 2016 20:31:09 +0200 (CEST)", "from theia.denx.de ([127.0.0.1])\n\tby localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 91klaAL-1UKb; Mon, 26 Sep 2016 20:31:08 +0200 (CEST)", "from theia.denx.de (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id 6BC11A7577;\n\tMon, 26 Sep 2016 20:31:08 +0200 (CEST)", "from localhost (localhost [127.0.0.1])\n\tby theia.denx.de (Postfix) with ESMTP id 76B1EA7599\n\tfor <u-boot@lists.denx.de>; Mon, 26 Sep 2016 20:31:05 +0200 (CEST)", "from theia.denx.de ([127.0.0.1])\n\tby localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id BK_-lgiSL3st for <u-boot@lists.denx.de>;\n\tMon, 26 Sep 2016 20:31:05 +0200 (CEST)", "from mailapp01.imgtec.com (mailapp02.imgtec.com [217.156.133.132])\n\tby theia.denx.de (Postfix) with ESMTP id 3371BA7577\n\tfor <u-boot@lists.denx.de>; Mon, 26 Sep 2016 20:31:03 +0200 (CEST)", "from HHMAIL01.hh.imgtec.org (unknown [10.100.10.19])\n\tby Forcepoint Email with ESMTPS id CC419C390F9A2;\n\tMon, 26 Sep 2016 19:30:58 +0100 (IST)", "from localhost (10.100.200.111) by HHMAIL01.hh.imgtec.org\n\t(10.100.10.21) with Microsoft SMTP Server (TLS) id 14.3.294.0;\n\tMon, 26 Sep 2016 19:31:01 +0100" ], "X-policyd-weight": "NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5\n\tNOT_IN_BL_NJABL=-1.5 (only DNSBL check requested)", "From": "Paul Burton <paul.burton@imgtec.com>", "To": "<u-boot@lists.denx.de>, Daniel Schwierzeck <daniel.schwierzeck@gmail.com>", "Date": "Mon, 26 Sep 2016 19:29:00 +0100", "Message-ID": "<20160926182917.27531-7-paul.burton@imgtec.com>", "X-Mailer": "git-send-email 2.10.0", "In-Reply-To": "<20160926182917.27531-1-paul.burton@imgtec.com>", "References": "<20160926182917.27531-1-paul.burton@imgtec.com>", "MIME-Version": "1.0", "X-Originating-IP": "[10.100.200.111]", "Subject": "[U-Boot] [PATCH 06/23] pci: Set of_offset for devices not probed\n\tvia DT compatible strings", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<http://lists.denx.de/mailman/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>", "List-Archive": "<http://lists.denx.de/pipermail/u-boot/>", "List-Post": "<mailto:u-boot@lists.denx.de>", "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>", "List-Subscribe": "<http://lists.denx.de/mailman/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "u-boot-bounces@lists.denx.de", "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>" }, "content": "A PCI device may be probed through standard PCI config space probing but\nstill be represented in a device tree. However U-Boot would not\npreviously set the of_offset field of the struct udevice for such PCI\ndevices. Fix this by searching for a DT node based upon its \"reg\"\nproperty after binding a PCI device that wasn't already seen in the DT.\n\nSigned-off-by: Paul Burton <paul.burton@imgtec.com>\n\n---\n\n drivers/pci/pci-uclass.c | 32 ++++++++++++++++++++++++++++++++\n 1 file changed, 32 insertions(+)", "diff": "diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c\nindex 3b00e6a..415c632 100644\n--- a/drivers/pci/pci-uclass.c\n+++ b/drivers/pci/pci-uclass.c\n@@ -670,6 +670,33 @@ error:\n \treturn ret;\n }\n \n+static int find_pci_of_offset(struct udevice *bus, struct udevice *dev,\n+\t\t\t pci_dev_t bdf)\n+{\n+\tstruct fdt_pci_addr addr;\n+\tint offset, err;\n+\n+\tif (bus->of_offset == -1)\n+\t\treturn -ENOENT;\n+\n+\tfdt_for_each_subnode(gd->fdt_blob, offset, bus->of_offset) {\n+\t\terr = fdtdec_get_pci_addr(gd->fdt_blob, offset,\n+\t\t\t\t\t FDT_PCI_SPACE_CONFIG, \"reg\", &addr);\n+\t\tif (err == -ENOENT)\n+\t\t\tcontinue;\n+\t\tif (err)\n+\t\t\treturn err;\n+\n+\t\tif (bdf != (addr.phys_hi & 0xffff00))\n+\t\t\tcontinue;\n+\n+\t\tdev->of_offset = offset;\n+\t\treturn 0;\n+\t}\n+\n+\treturn -ENOENT;\n+}\n+\n int pci_bind_bus_devices(struct udevice *bus)\n {\n \tulong vendor, device;\n@@ -731,6 +758,11 @@ int pci_bind_bus_devices(struct udevice *bus)\n \t\t\t}\n \t\t\tret = pci_find_and_bind_driver(bus, &find_id, bdf,\n \t\t\t\t\t\t &dev);\n+\t\t\tif (!ret) {\n+\t\t\t\tret = find_pci_of_offset(bus, dev, bdf);\n+\t\t\t\tif (ret == -ENOENT)\n+\t\t\t\t\tret = 0;\n+\t\t\t}\n \t\t}\n \t\tif (ret == -EPERM)\n \t\t\tcontinue;\n", "prefixes": [ "U-Boot", "06/23" ] }