Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/811571/?format=api
{ "id": 811571, "url": "http://patchwork.ozlabs.org/api/patches/811571/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/1504875731-3680-4-git-send-email-hayashi.kunihiko@socionext.com/", "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": "<1504875731-3680-4-git-send-email-hayashi.kunihiko@socionext.com>", "list_archive_url": null, "date": "2017-09-08T13:02:11", "name": "[net-next,3/3] net: phy: realtek: add RTL8201F phy-id and functions", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "8811e3c26fd47e71e3396ff3bb846b211e501fff", "submitter": { "id": 71700, "url": "http://patchwork.ozlabs.org/api/people/71700/?format=api", "name": "Kunihiko Hayashi", "email": "hayashi.kunihiko@socionext.com" }, "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/1504875731-3680-4-git-send-email-hayashi.kunihiko@socionext.com/mbox/", "series": [ { "id": 2200, "url": "http://patchwork.ozlabs.org/api/series/2200/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=2200", "date": "2017-09-08T13:02:11", "name": "add UniPhier AVE ethernet support", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/2200/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/811571/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/811571/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<netdev-owner@vger.kernel.org>", "X-Original-To": "patchwork-incoming@ozlabs.org", "Delivered-To": "patchwork-incoming@ozlabs.org", "Authentication-Results": "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)", "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xpctf022rz9ryk\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 8 Sep 2017 23:02:50 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S932389AbdIHNCi (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tFri, 8 Sep 2017 09:02:38 -0400", "from mx.socionext.com ([202.248.49.38]:38764 \"EHLO\n\tmx.socionext.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S932120AbdIHNCb (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tFri, 8 Sep 2017 09:02:31 -0400", "from unknown (HELO iyokan-ex.css.socionext.com) ([172.31.9.54])\n\tby mx.socionext.com with ESMTP; 08 Sep 2017 22:02:29 +0900", "from mail.mfilter.local (unknown [10.213.24.61])\n\tby iyokan-ex.css.socionext.com (Postfix) with ESMTP id 2CE44610C6;\n\tFri, 8 Sep 2017 22:02:30 +0900 (JST)", "from 172.31.9.51 (172.31.9.51) by m-FILTER with ESMTP;\n\tFri, 8 Sep 2017 22:02:30 +0900", "from plum.e01.socionext.com (unknown [10.213.132.32])\n\tby kinkan.css.socionext.com (Postfix) with ESMTP id 83DE41A0E11;\n\tFri, 8 Sep 2017 22:02:29 +0900 (JST)" ], "From": "Kunihiko Hayashi <hayashi.kunihiko@socionext.com>", "To": "netdev@vger.kernel.org, \"David S. Miller\" <davem@davemloft.net>,\n\tAndrew Lunn <andrew@lunn.ch>, Florian Fainelli <f.fainelli@gmail.com>", "Cc": "Rob Herring <robh+dt@kernel.org>, Mark Rutland <mark.rutland@arm.com>,\n\tlinux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org,\n\tdevicetree@vger.kernel.org,\n\tMasahiro Yamada <yamada.masahiro@socionext.com>,\n\tMasami Hiramatsu <masami.hiramatsu@linaro.org>,\n\tJassi Brar <jaswinder.singh@linaro.org>,\n\tJongsung Kim <neidhard.kim@lge.com>,\n\tKunihiko Hayashi <hayashi.kunihiko@socionext.com>", "Subject": "[PATCH net-next 3/3] net: phy: realtek: add RTL8201F phy-id and\n\tfunctions", "Date": "Fri, 8 Sep 2017 22:02:11 +0900", "Message-Id": "<1504875731-3680-4-git-send-email-hayashi.kunihiko@socionext.com>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1504875731-3680-1-git-send-email-hayashi.kunihiko@socionext.com>", "References": "<1504875731-3680-1-git-send-email-hayashi.kunihiko@socionext.com>", "Sender": "netdev-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<netdev.vger.kernel.org>", "X-Mailing-List": "netdev@vger.kernel.org" }, "content": "From: Jassi Brar <jaswinder.singh@linaro.org>\n\nAdd RTL8201F phy-id and the related functions to the driver.\n\nThe original patch is as follows:\nhttps://patchwork.kernel.org/patch/2538341/\n\nSigned-off-by: Jongsung Kim <neidhard.kim@lge.com>\nSigned-off-by: Jassi Brar <jaswinder.singh@linaro.org>\nSigned-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>\n---\n drivers/net/phy/realtek.c | 45 +++++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 45 insertions(+)", "diff": "diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c\nindex 9cbe645..d9974ce 100644\n--- a/drivers/net/phy/realtek.c\n+++ b/drivers/net/phy/realtek.c\n@@ -29,10 +29,23 @@\n #define RTL8211F_PAGE_SELECT\t0x1f\n #define RTL8211F_TX_DELAY\t0x100\n \n+#define RTL8201F_ISR\t\t0x1e\n+#define RTL8201F_PAGE_SELECT\t0x1f\n+#define RTL8201F_IER\t\t0x13\n+\n MODULE_DESCRIPTION(\"Realtek PHY driver\");\n MODULE_AUTHOR(\"Johnson Leung\");\n MODULE_LICENSE(\"GPL\");\n \n+static int rtl8201_ack_interrupt(struct phy_device *phydev)\n+{\n+\tint err;\n+\n+\terr = phy_read(phydev, RTL8201F_ISR);\n+\n+\treturn (err < 0) ? err : 0;\n+}\n+\n static int rtl821x_ack_interrupt(struct phy_device *phydev)\n {\n \tint err;\n@@ -54,6 +67,25 @@ static int rtl8211f_ack_interrupt(struct phy_device *phydev)\n \treturn (err < 0) ? err : 0;\n }\n \n+static int rtl8201_config_intr(struct phy_device *phydev)\n+{\n+\tint err;\n+\n+\t/* switch to page 7 */\n+\tphy_write(phydev, RTL8201F_PAGE_SELECT, 0x7);\n+\n+\tif (phydev->interrupts == PHY_INTERRUPT_ENABLED)\n+\t\terr = phy_write(phydev, RTL8201F_IER,\n+\t\t\t\tBIT(13) | BIT(12) | BIT(11));\n+\telse\n+\t\terr = phy_write(phydev, RTL8201F_IER, 0);\n+\n+\t/* restore to default page 0 */\n+\tphy_write(phydev, RTL8201F_PAGE_SELECT, 0x0);\n+\n+\treturn err;\n+}\n+\n static int rtl8211b_config_intr(struct phy_device *phydev)\n {\n \tint err;\n@@ -129,6 +161,18 @@ static struct phy_driver realtek_drvs[] = {\n \t\t.config_aneg = &genphy_config_aneg,\n \t\t.read_status = &genphy_read_status,\n \t}, {\n+\t\t.phy_id\t\t= 0x001cc816,\n+\t\t.name\t\t= \"RTL8201F 10/100Mbps Ethernet\",\n+\t\t.phy_id_mask\t= 0x001fffff,\n+\t\t.features\t= PHY_BASIC_FEATURES,\n+\t\t.flags\t\t= PHY_HAS_INTERRUPT,\n+\t\t.config_aneg\t= &genphy_config_aneg,\n+\t\t.read_status\t= &genphy_read_status,\n+\t\t.ack_interrupt\t= &rtl8201_ack_interrupt,\n+\t\t.config_intr\t= &rtl8201_config_intr,\n+\t\t.suspend\t= genphy_suspend,\n+\t\t.resume\t\t= genphy_resume,\n+\t}, {\n \t\t.phy_id\t\t= 0x001cc912,\n \t\t.name\t\t= \"RTL8211B Gigabit Ethernet\",\n \t\t.phy_id_mask\t= 0x001fffff,\n@@ -181,6 +225,7 @@ static struct phy_driver realtek_drvs[] = {\n module_phy_driver(realtek_drvs);\n \n static struct mdio_device_id __maybe_unused realtek_tbl[] = {\n+\t{ 0x001cc816, 0x001fffff },\n \t{ 0x001cc912, 0x001fffff },\n \t{ 0x001cc914, 0x001fffff },\n \t{ 0x001cc915, 0x001fffff },\n", "prefixes": [ "net-next", "3/3" ] }