get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2140024/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2140024,
    "url": "http://patchwork.ozlabs.org/api/patches/2140024/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20250920161013.31799-2-ansuelsmth@gmail.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": "<20250920161013.31799-2-ansuelsmth@gmail.com>",
    "list_archive_url": null,
    "date": "2025-09-20T16:09:41",
    "name": "[v2,1/5] net: mediatek: mt7531/7988: fix broken PHY turn ON/OFF",
    "commit_ref": "9b2e1079e7db35155710a401eb52007abe449ad7",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "790cd8bdcb85518f9fbc1b39feed85a21720a946",
    "submitter": {
        "id": 71108,
        "url": "http://patchwork.ozlabs.org/api/people/71108/?format=api",
        "name": "Christian Marangi",
        "email": "ansuelsmth@gmail.com"
    },
    "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/20250920161013.31799-2-ansuelsmth@gmail.com/mbox/",
    "series": [
        {
            "id": 474528,
            "url": "http://patchwork.ozlabs.org/api/series/474528/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=474528",
            "date": "2025-09-20T16:09:40",
            "name": "net: mediatek: mt7988: various fixup + MDIO detach",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/474528/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2140024/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2140024/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 unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20230601 header.b=isgbjDj7;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=85.214.62.61; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)",
            "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=gmail.com",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de",
            "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.b=\"isgbjDj7\";\n\tdkim-atps=neutral",
            "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=gmail.com",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=ansuelsmth@gmail.com"
        ],
        "Received": [
            "from phobos.denx.de (phobos.denx.de [85.214.62.61])\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 4cTZ970971z1y24\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 21 Sep 2025 02:10:35 +1000 (AEST)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 832DD83390;\n\tSat, 20 Sep 2025 18:10:25 +0200 (CEST)",
            "by phobos.denx.de (Postfix, from userid 109)\n id 1B15882B07; Sat, 20 Sep 2025 18:10:24 +0200 (CEST)",
            "from mail-wm1-x332.google.com (mail-wm1-x332.google.com\n [IPv6:2a00:1450:4864:20::332])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 1D72982B07\n for <u-boot@lists.denx.de>; Sat, 20 Sep 2025 18:10:22 +0200 (CEST)",
            "by mail-wm1-x332.google.com with SMTP id\n 5b1f17b1804b1-45de56a042dso19544825e9.3\n for <u-boot@lists.denx.de>; Sat, 20 Sep 2025 09:10:22 -0700 (PDT)",
            "from Ansuel-XPS24 (host-95-249-236-54.retail.telecomitalia.it.\n [95.249.236.54]) by smtp.googlemail.com with ESMTPSA id\n 5b1f17b1804b1-45f325cec0fsm105878675e9.4.2025.09.20.09.10.20\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sat, 20 Sep 2025 09:10:20 -0700 (PDT)"
        ],
        "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,FREEMAIL_FROM,\n RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham\n autolearn_force=no version=3.4.2",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20230601; t=1758384621; x=1758989421; darn=lists.denx.de;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:to:from:from:to:cc:subject:date:message-id\n :reply-to; bh=DPLCJddy37ElqHCCinrM/0gIhq3nlDbuPmqdhyB27Ps=;\n b=isgbjDj7I0mXkASTRWyLweTJIargZWNAWS5RLxtQ82NGQU4Zqh75YrU/GlXioFMhGj\n hjUtLvlSVQd8I6SzI18Q1cFavuZYeZMikeXW1WrZCTmtJrKyK6MCKgDxG88yOslB4dUO\n 21nCaBk1ezNDHPpfcVO7EE8SUMqLgzelJ5xNN4k0NjZhUudJObGyjdNyaNJxdCGkgX+Z\n YhehbIzCy58Yk5crvwPV4FepMygqMioQ8by1wEehq4D9haMs7/6IU6wnxasGw3R8wvG0\n OnVtImv6W2fBB+YibTdhq2P8KOygoKR6a8GbxD/k0u38+aZBfu+OZ65HtEvY6kIZtqt3\n hs6A==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1758384621; x=1758989421;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:to:from:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=DPLCJddy37ElqHCCinrM/0gIhq3nlDbuPmqdhyB27Ps=;\n b=KGQt5uUfNC0n6UjA+OnlGBMrprlakyneS4E85UvzHhWFpZCWabU4uxOWu4hvvy0i4E\n yCovKgkHZQbPXsFavM2w3qHplkj82Fwmi0CQfBaleIE+QWH+lZFckP+RKGJ4BgBtUy9b\n cZcUZkOx7lwK8gUIGe3jRYUkpvhsbplJoN7h0RsH+u8mYEdQQ4HaXehpM/i8zZdmy/9G\n GHE26uegwDCVc0+frpzCrZABG4UtIeDq9IaRQIubZpqS0t+vWEBBd927emekJjl9Yl91\n 4cdLTCoelPADd9voTOIS88LH2nLcB4dSj1IflcQBQRl0vsvjD+XWpW2EuuJ/jlnE9a4R\n 0ISg==",
        "X-Forwarded-Encrypted": "i=1;\n AJvYcCWBtxWrEEhjatZBB06jMTO8FaeEr/rwPRhuQ6MH80kJZt1SrFRNPYzNgDDsKg/0u+b26WWHjcs=@lists.denx.de",
        "X-Gm-Message-State": "AOJu0YyPbZHCNlJKtWMPnKObT4vsI0ot2ydbSaG0kiqTsizykUnfqocM\n uLm2dNJzjY0JyeqN/Ezmu+/D84tv4NqgwIy4ELWKcSXU0qXbNVqa9Ing",
        "X-Gm-Gg": "ASbGncuCyP7jAZ4QWgEtuh1peeafdzFBoZHmg3JMeNQyHiRmZmPu2/vopU7RzU9fgBA\n 2FVheiGk1UF3bG6ESDT+Z/lgwOcGZh/XJxF+3U5A0DPsdiChdyVxATELW9oZ6jyfyc630W8Pq6z\n YJQbcNk5/0IKkNZH/KYe+sWiL4GXLtInU3k2UVErtiPkxOR/xj0tR/EuZbuJbWi1GTKALgF8dUo\n dTIDiwyR2BhWvKcQlKTnwtVRXpc/xHtzyYV9PE0ebVzuDlqQ+XNobcRyGTWspDsx4OE0hnUh5PN\n R6z8gGf64K5FTZ2SM+C6XZBsHRCzjO3MMgrDEocBA4ZEtDaoK2cC4UQtaD+cwkxrey7CkiBlmet\n q7EQ6DU6lP+PuoqhtJ42yPy+1zE1AcvkNUGC+c2vyTmiPHtUwkIkJ73kcTklyCq96N6X5D3MBxn\n IUp9bAsw==",
        "X-Google-Smtp-Source": "\n AGHT+IHx16x+YRbl9P7hqcicwL2xiPmrpFY4LdPvS7CesKR+1rtwSh3KdXXXteD5fgNptvZUkADxyg==",
        "X-Received": "by 2002:a05:600c:1d1b:b0:45d:98be:ee91 with SMTP id\n 5b1f17b1804b1-467eb8e20damr69355335e9.9.1758384621209;\n Sat, 20 Sep 2025 09:10:21 -0700 (PDT)",
        "From": "Christian Marangi <ansuelsmth@gmail.com>",
        "To": "Tom Rini <trini@konsulko.com>, Joe Hershberger <joe.hershberger@ni.com>,\n Ramon Fried <rfried.dev@gmail.com>, Weijie Gao <weijie.gao@mediatek.com>,\n Christian Marangi <ansuelsmth@gmail.com>, u-boot@lists.denx.de",
        "Subject": "[PATCH v2 1/5] net: mediatek: mt7531/7988: fix broken PHY turn ON/OFF",
        "Date": "Sat, 20 Sep 2025 18:09:41 +0200",
        "Message-ID": "<20250920161013.31799-2-ansuelsmth@gmail.com>",
        "X-Mailer": "git-send-email 2.51.0",
        "In-Reply-To": "<20250920161013.31799-1-ansuelsmth@gmail.com>",
        "References": "<20250920161013.31799-1-ansuelsmth@gmail.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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": "The PHY for MT7531/MT7988 are never actully turned ON/OFF for the\naffected PHY as we are read/writing to the wrong PHY address.\n\nThis is caused by the fact that we use the MT753X_PHY_ADDR macro 2\ntimes offsetting the address multiple times.\n\nOne in the _setup() function and one in the mt7531_mii_read/write.\n\nDrop the additional usage of MT753X_PHY_ADDR in setup() to correctly\nset the PHY.\n\nSigned-off-by: Christian Marangi <ansuelsmth@gmail.com>\n---\n drivers/net/mtk_eth/mt7531.c | 20 +++++++-------------\n drivers/net/mtk_eth/mt7988.c | 12 +++++-------\n 2 files changed, 12 insertions(+), 20 deletions(-)",
    "diff": "diff --git a/drivers/net/mtk_eth/mt7531.c b/drivers/net/mtk_eth/mt7531.c\nindex 32d6bebbbdb..965bc3cb7e9 100644\n--- a/drivers/net/mtk_eth/mt7531.c\n+++ b/drivers/net/mtk_eth/mt7531.c\n@@ -22,17 +22,13 @@\n \n static int mt7531_core_reg_read(struct mt753x_switch_priv *priv, u32 reg)\n {\n-\tu8 phy_addr = MT753X_PHY_ADDR(priv->phy_base, 0);\n-\n-\treturn mt7531_mmd_read(priv, phy_addr, 0x1f, reg);\n+\treturn mt7531_mmd_read(priv, 0, 0x1f, reg);\n }\n \n static void mt7531_core_reg_write(struct mt753x_switch_priv *priv, u32 reg,\n \t\t\t\t  u32 val)\n {\n-\tu8 phy_addr = MT753X_PHY_ADDR(priv->phy_base, 0);\n-\n-\tmt7531_mmd_write(priv, phy_addr, 0x1f, reg, val);\n+\tmt7531_mmd_write(priv, 0, 0x1f, reg, val);\n }\n \n static void mt7531_core_pll_setup(struct mt753x_switch_priv *priv)\n@@ -171,7 +167,7 @@ static int mt7531_setup(struct mtk_eth_switch_priv *swpriv)\n {\n \tstruct mt753x_switch_priv *priv = (struct mt753x_switch_priv *)swpriv;\n \tu32 i, val, pmcr, port5_sgmii;\n-\tu16 phy_addr, phy_val;\n+\tu16 phy_val;\n \n \tpriv->smi_addr = MT753X_DFL_SMI_ADDR;\n \tpriv->phy_base = (priv->smi_addr + 1) & MT753X_SMI_ADDR_MASK;\n@@ -180,10 +176,9 @@ static int mt7531_setup(struct mtk_eth_switch_priv *swpriv)\n \n \t/* Turn off PHYs */\n \tfor (i = 0; i < MT753X_NUM_PHYS; i++) {\n-\t\tphy_addr = MT753X_PHY_ADDR(priv->phy_base, i);\n-\t\tphy_val = mt7531_mii_read(priv, phy_addr, MII_BMCR);\n+\t\tphy_val = mt7531_mii_read(priv, i, MII_BMCR);\n \t\tphy_val |= BMCR_PDOWN;\n-\t\tmt7531_mii_write(priv, phy_addr, MII_BMCR, phy_val);\n+\t\tmt7531_mii_write(priv, i, MII_BMCR, phy_val);\n \t}\n \n \t/* Force MAC link down before reset */\n@@ -239,10 +234,9 @@ static int mt7531_setup(struct mtk_eth_switch_priv *swpriv)\n \n \t/* Turn on PHYs */\n \tfor (i = 0; i < MT753X_NUM_PHYS; i++) {\n-\t\tphy_addr = MT753X_PHY_ADDR(priv->phy_base, i);\n-\t\tphy_val = mt7531_mii_read(priv, phy_addr, MII_BMCR);\n+\t\tphy_val = mt7531_mii_read(priv, i, MII_BMCR);\n \t\tphy_val &= ~BMCR_PDOWN;\n-\t\tmt7531_mii_write(priv, phy_addr, MII_BMCR, phy_val);\n+\t\tmt7531_mii_write(priv, i, MII_BMCR, phy_val);\n \t}\n \n \tmt7531_phy_setting(priv);\ndiff --git a/drivers/net/mtk_eth/mt7988.c b/drivers/net/mtk_eth/mt7988.c\nindex a416d87840c..87b6ed30cd0 100644\n--- a/drivers/net/mtk_eth/mt7988.c\n+++ b/drivers/net/mtk_eth/mt7988.c\n@@ -61,7 +61,7 @@ static void mt7988_mac_control(struct mtk_eth_switch_priv *swpriv, bool enable)\n static int mt7988_setup(struct mtk_eth_switch_priv *swpriv)\n {\n \tstruct mt753x_switch_priv *priv = (struct mt753x_switch_priv *)swpriv;\n-\tu16 phy_addr, phy_val;\n+\tu16 phy_val;\n \tu32 pmcr;\n \tint i;\n \n@@ -72,10 +72,9 @@ static int mt7988_setup(struct mtk_eth_switch_priv *swpriv)\n \n \t/* Turn off PHYs */\n \tfor (i = 0; i < MT753X_NUM_PHYS; i++) {\n-\t\tphy_addr = MT753X_PHY_ADDR(priv->phy_base, i);\n-\t\tphy_val = mt7531_mii_read(priv, phy_addr, MII_BMCR);\n+\t\tphy_val = mt7531_mii_read(priv, i, MII_BMCR);\n \t\tphy_val |= BMCR_PDOWN;\n-\t\tmt7531_mii_write(priv, phy_addr, MII_BMCR, phy_val);\n+\t\tmt7531_mii_write(priv, i, MII_BMCR, phy_val);\n \t}\n \n \tswitch (priv->epriv.phy_interface) {\n@@ -128,10 +127,9 @@ static int mt7988_setup(struct mtk_eth_switch_priv *swpriv)\n \n \t/* Turn on PHYs */\n \tfor (i = 0; i < MT753X_NUM_PHYS; i++) {\n-\t\tphy_addr = MT753X_PHY_ADDR(priv->phy_base, i);\n-\t\tphy_val = mt7531_mii_read(priv, phy_addr, MII_BMCR);\n+\t\tphy_val = mt7531_mii_read(priv, i, MII_BMCR);\n \t\tphy_val &= ~BMCR_PDOWN;\n-\t\tmt7531_mii_write(priv, phy_addr, MII_BMCR, phy_val);\n+\t\tmt7531_mii_write(priv, i, MII_BMCR, phy_val);\n \t}\n \n \tmt7988_phy_setting(priv);\n",
    "prefixes": [
        "v2",
        "1/5"
    ]
}