Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2156716/?format=api
{ "id": 2156716, "url": "http://patchwork.ozlabs.org/api/patches/2156716/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20251027140439.9044-1-marek.vasut+renesas@mailbox.org/", "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": "<20251027140439.9044-1-marek.vasut+renesas@mailbox.org>", "list_archive_url": null, "date": "2025-10-27T14:03:58", "name": "[v2] net: phy: dp83869: fix STRAP_OPMODE bitmask", "commit_ref": "85a7e45c3350afd9f7c17bb0bb2a47aa94be982d", "pull_url": null, "state": "accepted", "archived": false, "hash": "3d3efe0d9a418840e52b49947905afa433703be1", "submitter": { "id": 85650, "url": "http://patchwork.ozlabs.org/api/people/85650/?format=api", "name": "Marek Vasut", "email": "marek.vasut+renesas@mailbox.org" }, "delegate": { "id": 157425, "url": "http://patchwork.ozlabs.org/api/users/157425/?format=api", "username": "jforissier", "first_name": "Jerome", "last_name": "Forissier", "email": "jerome.forissier@linaro.org" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20251027140439.9044-1-marek.vasut+renesas@mailbox.org/mbox/", "series": [ { "id": 479693, "url": "http://patchwork.ozlabs.org/api/series/479693/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=479693", "date": "2025-10-27T14:03:58", "name": "[v2] net: phy: dp83869: fix STRAP_OPMODE bitmask", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/479693/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2156716/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2156716/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=mailbox.org header.i=@mailbox.org header.a=rsa-sha256\n header.s=mail20150812 header.b=ifkFZnS0;\n\tdkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org\n header.a=rsa-sha256 header.s=mail20150812 header.b=X8d0n/uI;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)", "phobos.denx.de;\n dmarc=pass (p=reject dis=none) header.from=mailbox.org", "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de", "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n secure) header.d=mailbox.org header.i=@mailbox.org header.b=\"ifkFZnS0\";\n\tdkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org\n header.b=\"X8d0n/uI\";\n\tdkim-atps=neutral", "phobos.denx.de;\n dmarc=pass (p=reject dis=none) header.from=mailbox.org", "phobos.denx.de;\n spf=pass smtp.mailfrom=marek.vasut+renesas@mailbox.org", "outgoing_mbo_mout;\n dkim=pass header.d=mailbox.org header.s=mail20150812 header.b=\"X8d0n/uI\";\n spf=pass (outgoing_mbo_mout: domain of marek.vasut+renesas@mailbox.org\n designates 2001:67c:2050:b231:465::202 as permitted sender)\n smtp.mailfrom=marek.vasut+renesas@mailbox.org" ], "Received": [ "from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4cwFdC4Sncz1yJ9\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 28 Oct 2025 01:05:03 +1100 (AEDT)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 8A2F88352B;\n\tMon, 27 Oct 2025 15:05:00 +0100 (CET)", "by phobos.denx.de (Postfix, from userid 109)\n id 4469D836B4; Mon, 27 Oct 2025 15:04:59 +0100 (CET)", "from mout-p-102.mailbox.org (mout-p-102.mailbox.org [80.241.56.152])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 0351C82E34\n for <u-boot@lists.denx.de>; Mon, 27 Oct 2025 15:04:57 +0100 (CET)", "from smtp202.mailbox.org (smtp202.mailbox.org\n [IPv6:2001:67c:2050:b231:465::202])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4cwFd45FVGz9sn0;\n Mon, 27 Oct 2025 15:04:56 +0100 (CET)" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,\n RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,\n SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2", "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org;\n s=mail20150812; t=1761573896;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding;\n bh=iISJsJMacbIS/XcHKTCdppfGdy4YZsXLSRB05vs8lzM=;\n b=ifkFZnS0YIIUh3sSPS2Do25sTh8wTh/KB8KpvnsSs+/Q2ogWkOi/Vt3+Ndbk+MOQUvWZtF\n HhYIdnBEwA43gcGa0YRR9nuy7cANp5+IVLpP0IJostNR9OSeYRW6dpjmP2/2aPZmYLlPuo\n QulbixgdbUWeyroxGaJknJsUrOHqI5NSTQnkXZoLm5JDCb3k5kfZgrPmvElgBR7HnKNos8\n VW2f7z1uPMEZvQgIxl9oXXFTL3CYUZTjOePtuDx7UCh4wiilhASP04pDLNrJPkWboGKlb7\n BPaFtYVoM1ZSE1FwFC7txkxXZuq0b29Ti/fIXo6yCjOidCLmE0qoQWmMwnb2EA==", "v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org;\n s=mail20150812; t=1761573894;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding;\n bh=iISJsJMacbIS/XcHKTCdppfGdy4YZsXLSRB05vs8lzM=;\n b=X8d0n/uIBbXOJPVoJRUBajvvMe0TyJMJ1SoMoPZTRNT/KXGdzkaHGDL2yxcZ8qWhccjgcT\n g3FSXKDfLUNIWuXQr8jFjFyDhAOgdI30ufNcFnzFHXhA5RWXU58BT1wkjdwhbkCYcWgjs7\n +FqUkdu4+5FyU6lJ30z8yT4qJJC33BrDKn8Mdh7tssopj4zQUf7CDDQ+8AtlT/f9DjpTde\n akPzUm/9E0G2YvSjo3dUSEfgfJYYKaRNd6HQVy0iebMyyM8Id29t3AVC7V73yBCPRXnrAC\n U4W7ONQMDIarts9g1nGV8s33SICtEFPxxMb/LTHb0LxYXoyx0kH3OOsvD5ENww==" ], "From": "Marek Vasut <marek.vasut+renesas@mailbox.org>", "To": "u-boot@lists.denx.de", "Cc": "Thanh Quan <thanh.quan.xn@renesas.com>,\n Hai Pham <hai.pham.ud@renesas.com>,\n Marek Vasut <marek.vasut+renesas@mailbox.org>,\n Dominic Rath <rath@ibv-augsburg.net>,\n Jerome Forissier <jerome.forissier@linaro.org>,\n Joe Hershberger <joe.hershberger@ni.com>,\n Ramon Fried <rfried.dev@gmail.com>, Tom Rini <trini@konsulko.com>", "Subject": "[PATCH v2] net: phy: dp83869: fix STRAP_OPMODE bitmask", "Date": "Mon, 27 Oct 2025 15:03:58 +0100", "Message-ID": "<20251027140439.9044-1-marek.vasut+renesas@mailbox.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-MBO-RS-ID": "ced68900c646548713d", "X-MBO-RS-META": "snohr53t1iicj6rees597qj3u8diyxid", "X-Rspamd-Queue-Id": "4cwFd45FVGz9sn0", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.39", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>", "List-Archive": "<https://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": "<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>", "Errors-To": "u-boot-bounces@lists.denx.de", "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>", "X-Virus-Scanned": "clamav-milter 0.103.8 at phobos.denx.de", "X-Virus-Status": "Clean" }, "content": "From: Thanh Quan <thanh.quan.xn@renesas.com>\n\nAccording to the TI DP83869HM datasheet Revision D (June 2025), section\n7.6.1.41 STRAP_STS Register, the STRAP_OPMODE bitmask is bit [11:9].\nFix this.\n\nIn case the PHY is auto-detected via PHY ID registers, or not described\nin DT, or, in case the PHY is described in DT but the optional DT property\n\"ti,op-mode\" is not present, then the driver reads out the PHY functional\nmode (RGMII, SGMII, ...) from hardware straps.\n\nCurrently, all upstream users of this PHY specify both DT compatible string\n\"ethernet-phy-id2000.a0f1\" and ti,op-mode = <DP83869_RGMII_COPPER_ETHERNET>\nproperty, therefore it seems no upstream users are affected by this bug.\n\nThe driver currently interprets bits [2:0] of STRAP_STS register as PHY\nfunctional mode. Those bits are controlled by ANEG_DIS, ANEGSEL_0 straps\nand an always-zero reserved bit. Systems that use RGMII-to-Copper functional\nmode are unlikely to disable auto-negotiation via ANEG_DIS strap, or change\nauto-negotiation behavior via ANEGSEL_0 strap. Therefore, even with this bug\nin place, the STRAP_STS register content is likely going to be interpreted\nby the driver as RGMII-to-Copper mode.\n\nHowever, for a system with PHY functional mode strapping set to other mode\nthan RGMII-to-Copper, the driver is likely to misinterpret the strapping\nas RGMII-to-Copper and misconfigure the PHY.\n\nFor example, on a system with SGMII-to-Copper strapping, the STRAP_STS\nregister reads as 0x0c20, but the PHY ends up being configured for\nincompatible RGMII-to-Copper mode.\n\nFixes: f3e22eea815d (\"net: phy: add TI DP83869HM ethernet driver\")\nSigned-off-by: Thanh Quan <thanh.quan.xn@renesas.com>\nSigned-off-by: Hai Pham <hai.pham.ud@renesas.com>\nSigned-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> # Use FIELD_GET()\n---\nCc: Dominic Rath <rath@ibv-augsburg.net>\nCc: Hai Pham <hai.pham.ud@renesas.com>\nCc: Jerome Forissier <jerome.forissier@linaro.org>\nCc: Joe Hershberger <joe.hershberger@ni.com>\nCc: Ramon Fried <rfried.dev@gmail.com>\nCc: Thanh Quan <thanh.quan.xn@renesas.com>\nCc: Tom Rini <trini@konsulko.com>\nCc: u-boot@lists.denx.de\n---\nV2: Update commit message to match Linux\n---\n drivers/net/phy/dp83869.c | 5 +++--\n 1 file changed, 3 insertions(+), 2 deletions(-)", "diff": "diff --git a/drivers/net/phy/dp83869.c b/drivers/net/phy/dp83869.c\nindex b6fb5adae1f..c60fbf26a03 100644\n--- a/drivers/net/phy/dp83869.c\n+++ b/drivers/net/phy/dp83869.c\n@@ -5,6 +5,7 @@\n */\n \n #include <phy.h>\n+#include <linux/bitfield.h>\n #include <linux/compat.h>\n #include <malloc.h>\n \n@@ -64,7 +65,7 @@\n #define DP83869_RGMII_RX_CLK_DELAY_EN\t\tBIT(0)\n \n /* STRAP_STS1 bits */\n-#define DP83869_STRAP_OP_MODE_MASK\t\tGENMASK(2, 0)\n+#define DP83869_STRAP_OP_MODE_MASK\t\tGENMASK(11, 9)\n #define DP83869_STRAP_STS1_RESERVED\t\tBIT(11)\n #define DP83869_STRAP_MIRROR_ENABLED\t\tBIT(12)\n \n@@ -168,7 +169,7 @@ static int dp83869_set_strapped_mode(struct phy_device *phydev)\n \tif (val < 0)\n \t\treturn val;\n \n-\tdp83869->mode = val & DP83869_STRAP_OP_MODE_MASK;\n+\tdp83869->mode = FIELD_GET(DP83869_STRAP_OP_MODE_MASK, val);\n \n \treturn 0;\n }\n", "prefixes": [ "v2" ] }