Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1370436/?format=api
{ "id": 1370436, "url": "http://patchwork.ozlabs.org/api/patches/1370436/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20200924083746.GA9410@laureti-dev/", "project": { "id": 7, "url": "http://patchwork.ozlabs.org/api/projects/7/?format=api", "name": "Linux network development", "link_name": "netdev", "list_id": "netdev.vger.kernel.org", "list_email": "netdev@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20200924083746.GA9410@laureti-dev>", "list_archive_url": null, "date": "2020-09-24T08:37:47", "name": "net: dsa: microchip: really look for phy-mode in port nodes", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "b9331b9af606afa39262913d3a451b37b779320f", "submitter": { "id": 73976, "url": "http://patchwork.ozlabs.org/api/people/73976/?format=api", "name": "Helmut Grohne", "email": "helmut.grohne@intenta.de" }, "delegate": { "id": 34, "url": "http://patchwork.ozlabs.org/api/users/34/?format=api", "username": "davem", "first_name": "David", "last_name": "Miller", "email": "davem@davemloft.net" }, "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/20200924083746.GA9410@laureti-dev/mbox/", "series": [ { "id": 203875, "url": "http://patchwork.ozlabs.org/api/series/203875/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=203875", "date": "2020-09-24T08:37:47", "name": "net: dsa: microchip: really look for phy-mode in port nodes", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/203875/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1370436/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1370436/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<netdev-owner@vger.kernel.org>", "X-Original-To": "patchwork-incoming-netdev@ozlabs.org", "Delivered-To": "patchwork-incoming-netdev@ozlabs.org", "Authentication-Results": [ "ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=23.128.96.18; helo=vger.kernel.org;\n envelope-from=netdev-owner@vger.kernel.org; receiver=<UNKNOWN>)", "ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=intenta.de", "ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=intenta.de header.i=@intenta.de header.a=rsa-sha256\n header.s=dkim1 header.b=YrhZ1z3d;\n\tdkim-atps=neutral" ], "Received": [ "from vger.kernel.org (vger.kernel.org [23.128.96.18])\n\tby ozlabs.org (Postfix) with ESMTP id 4BxpTj17b6z9sTQ\n\tfor <patchwork-incoming-netdev@ozlabs.org>;\n Thu, 24 Sep 2020 18:43:05 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n id S1727330AbgIXInE (ORCPT\n <rfc822;patchwork-incoming-netdev@ozlabs.org>);\n Thu, 24 Sep 2020 04:43:04 -0400", "from mail.intenta.de ([178.249.25.132]:37150 \"EHLO mail.intenta.de\"\n rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n id S1726811AbgIXInC (ORCPT <rfc822;netdev@vger.kernel.org>);\n Thu, 24 Sep 2020 04:43:02 -0400" ], "X-Greylist": "delayed 309 seconds by postgrey-1.27 at vger.kernel.org;\n Thu, 24 Sep 2020 04:43:01 EDT", "DKIM-Signature": "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=intenta.de;\n s=dkim1;\n h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:CC:To:From:Date;\n bh=BXTF18riOp+4eJobrYt1HthX37h7jdYvM9cOfc+Lyds=;\n b=YrhZ1z3dxs5xJfgHRQ4e2i+IEk0e/IPsG3FaTC42q8lQzRI+pk8w8qwDUgxTc7XGMlugGTdf5uUQpx4jgPwxKuBKQIv3++1ZPUPinigheobtxDj9vHm0J18VcXQCnDxoBL0eh93T2QBozV22ENmoNXarKnvrkSAZOXSZtECC2Zia78EoGw2mIyDh+8t6oR5gjTIxRP42TI1U3geUBuJ0CHY/a8HQEBcOqclvHZyJm93fVGF84H7MZ4+FdWIEpKz3meAdpvko/zznaeIB2S3/tORMzpTbiilbYr3He1G8HJltg0TDo3MM1mnQ9c4JLjZzo7EosiQR80xPb2KN7+k9Cg==;", "Date": "Thu, 24 Sep 2020 10:37:47 +0200", "From": "Helmut Grohne <helmut.grohne@intenta.de>", "To": "David Miller <davem@davemloft.net>", "CC": "<nicolas.ferre@microchip.com>, <alexandre.belloni@bootlin.com>,\n <ludovic.desroches@microchip.com>, <woojung.huh@microchip.com>,\n <UNGLinuxDriver@microchip.com>, <andrew@lunn.ch>,\n <vivien.didelot@gmail.com>, <f.fainelli@gmail.com>,\n <kuba@kernel.org>, <robh+dt@kernel.org>,\n <devicetree@vger.kernel.org>, <netdev@vger.kernel.org>", "Subject": "[PATCH] net: dsa: microchip: really look for phy-mode in port nodes", "Message-ID": "<20200924083746.GA9410@laureti-dev>", "References": "<20200910.123257.1333858679864684014.davem@davemloft.net>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Disposition": "inline", "In-Reply-To": "<20200910.123257.1333858679864684014.davem@davemloft.net>", "User-Agent": "Mutt/1.10.1 (2018-07-13)", "X-ClientProxiedBy": "ICSMA002.intenta.de (10.10.16.48) To ICSMA002.intenta.de\n (10.10.16.48)", "Precedence": "bulk", "List-ID": "<netdev.vger.kernel.org>", "X-Mailing-List": "netdev@vger.kernel.org" }, "content": "The previous implementation failed to account for the \"ports\" node. The\nactual port nodes are not child nodes of the switch node, but a \"ports\"\nnode sits in between.\n\nFixes: edecfa98f602 (\"net: dsa: microchip: look for phy-mode in port nodes\")\nSigned-off-by: Helmut Grohne <helmut.grohne@intenta.de>\n---\n drivers/net/dsa/microchip/ksz_common.c | 20 ++++++++++++--------\n 1 file changed, 12 insertions(+), 8 deletions(-)\n\nI am very sorry that I need to send a fixup. It turned out that my\ntesting methodology was flawed. When I reintegrated Linus' master\nbranch, I noticed that it didn't work. It turned out that our hardware\nnow correctly implements hardware reset. As a consequence, the correct\nsetting of the phy-mode now became essential to operating the device.\n\nI'm also looking forward to see \"net: dsa: microchip: Improve phy mode\nmessage\" (from net-next) being merged. That would have helped me spot\nthis earlier.\n\nHelmut", "diff": "diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c\nindex 8e755b50c9c1..c796d42730ba 100644\n--- a/drivers/net/dsa/microchip/ksz_common.c\n+++ b/drivers/net/dsa/microchip/ksz_common.c\n@@ -387,8 +387,8 @@ EXPORT_SYMBOL(ksz_switch_alloc);\n int ksz_switch_register(struct ksz_device *dev,\n \t\t\tconst struct ksz_dev_ops *ops)\n {\n+\tstruct device_node *port, *ports;\n \tphy_interface_t interface;\n-\tstruct device_node *port;\n \tunsigned int port_num;\n \tint ret;\n \n@@ -429,13 +429,17 @@ int ksz_switch_register(struct ksz_device *dev,\n \t\tret = of_get_phy_mode(dev->dev->of_node, &interface);\n \t\tif (ret == 0)\n \t\t\tdev->compat_interface = interface;\n-\t\tfor_each_available_child_of_node(dev->dev->of_node, port) {\n-\t\t\tif (of_property_read_u32(port, \"reg\", &port_num))\n-\t\t\t\tcontinue;\n-\t\t\tif (port_num >= dev->port_cnt)\n-\t\t\t\treturn -EINVAL;\n-\t\t\tof_get_phy_mode(port, &dev->ports[port_num].interface);\n-\t\t}\n+\t\tports = of_get_child_by_name(dev->dev->of_node, \"ports\");\n+\t\tif (ports)\n+\t\t\tfor_each_available_child_of_node(ports, port) {\n+\t\t\t\tif (of_property_read_u32(port, \"reg\",\n+\t\t\t\t\t\t\t &port_num))\n+\t\t\t\t\tcontinue;\n+\t\t\t\tif (port_num >= dev->port_cnt)\n+\t\t\t\t\treturn -EINVAL;\n+\t\t\t\tof_get_phy_mode(port,\n+\t\t\t\t\t\t&dev->ports[port_num].interface);\n+\t\t\t}\n \t\tdev->synclko_125 = of_property_read_bool(dev->dev->of_node,\n \t\t\t\t\t\t\t \"microchip,synclko-125\");\n \t}\n", "prefixes": [] }