get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1614912,
    "url": "http://patchwork.ozlabs.org/api/patches/1614912/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20220408143015.23163-3-pali@kernel.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": "<20220408143015.23163-3-pali@kernel.org>",
    "list_archive_url": null,
    "date": "2022-04-08T14:30:14",
    "name": "[3/4] board: turris: Allow to specify first eth idx of first MAC address",
    "commit_ref": "98bbb6e7ab9b263a84c50a581c30089f9126c708",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "b0b0b8b4457c918d75261d3d8afa0f0957ac2101",
    "submitter": {
        "id": 78810,
        "url": "http://patchwork.ozlabs.org/api/people/78810/?format=api",
        "name": "Pali Rohár",
        "email": "pali@kernel.org"
    },
    "delegate": {
        "id": 1696,
        "url": "http://patchwork.ozlabs.org/api/users/1696/?format=api",
        "username": "stroese",
        "first_name": "Stefan",
        "last_name": "Roese",
        "email": "sr@denx.de"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20220408143015.23163-3-pali@kernel.org/mbox/",
    "series": [
        {
            "id": 294208,
            "url": "http://patchwork.ozlabs.org/api/series/294208/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=294208",
            "date": "2022-04-08T14:30:13",
            "name": "[1/4] board: turris: Move Turris Atsha OTP code to separate file",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/294208/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1614912/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1614912/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",
        "Authentication-Results": [
            "bilbo.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=gIJVCDt8;\n\tdkim-atps=neutral",
            "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=<UNKNOWN>)",
            "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=kernel.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 unprotected) header.d=kernel.org header.i=@kernel.org header.b=\"gIJVCDt8\";\n\tdkim-atps=neutral",
            "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=kernel.org",
            "phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.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 RSA-PSS (4096 bits))\n\t(No client certificate requested)\n\tby bilbo.ozlabs.org (Postfix) with ESMTPS id 4KZggF0c70z9sFy\n\tfor <incoming@patchwork.ozlabs.org>; Sat,  9 Apr 2022 00:31:53 +1000 (AEST)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id B7ACC83DA2;\n\tFri,  8 Apr 2022 16:31:37 +0200 (CEST)",
            "by phobos.denx.de (Postfix, from userid 109)\n id CF8C983D0F; Fri,  8 Apr 2022 16:31:31 +0200 (CEST)",
            "from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217])\n (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n bits)) (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 7775583DA0\n for <u-boot@lists.denx.de>; Fri,  8 Apr 2022 16:31:27 +0200 (CEST)",
            "from smtp.kernel.org (relay.kernel.org [52.25.139.140])\n (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n (No client certificate requested)\n by dfw.source.kernel.org (Postfix) with ESMTPS id 49C6A61ADD;\n Fri,  8 Apr 2022 14:31:26 +0000 (UTC)",
            "by smtp.kernel.org (Postfix) with ESMTPSA id 8FA13C385A3;\n Fri,  8 Apr 2022 14:31:25 +0000 (UTC)",
            "by pali.im (Postfix)\n id 367FDB20; Fri,  8 Apr 2022 16:31:23 +0200 (CEST)"
        ],
        "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,DKIMWL_WL_HIGH,\n DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,\n SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no\n version=3.4.2",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n s=k20201202; t=1649428285;\n bh=q2ir68toIAieHjyC395kV0LEciqn01ZFRSWWnYJen9A=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=gIJVCDt8GuIEcKGhrrERu90zRLFDUbtILuzQGStFL6eWUPqFtN8NPRNwbGdEBbXSV\n fW3e4HwI3Hv+leaSs9tkcX9tRUHA9hILC5flEt+O7XyttClVO0jbrwEpeLhNHTlLAd\n PWghECggwhBpV+vo+CyV27N6Ub4yVkmmokKhoEfljqROcP0c94pXXm/rR0gLo9GhPU\n 5hbSMrOzNxKIbV7UA0s+py6PddLy/Bd6nQ4AuLLog/w+QLuwH4ymPHjm/VbDF1MQuk\n o/l5o8zlW6qrlrTZVMaCp2puNNUNhBh60SOA/l6KeEqwxdAxDwqOa5qgICHOr1ZHkf\n 2Shyh+V5ZlM0A==",
        "From": "=?utf-8?q?Pali_Roh=C3=A1r?= <pali@kernel.org>",
        "To": "Stefan Roese <sr@denx.de>,\n\tMarek Behun <marek.behun@nic.cz>",
        "Cc": "u-boot@lists.denx.de",
        "Subject": "[PATCH 3/4] board: turris: Allow to specify first eth idx of first\n MAC address",
        "Date": "Fri,  8 Apr 2022 16:30:14 +0200",
        "Message-Id": "<20220408143015.23163-3-pali@kernel.org>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20220408143015.23163-1-pali@kernel.org>",
        "References": "<20220408143015.23163-1-pali@kernel.org>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "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.5 at phobos.denx.de",
        "X-Virus-Status": "Clean"
    },
    "content": "Turris Omnia uses first MAC address from OTP for second ethernet interface.\nSecond MAC address for third interface and third MAC address for first\ninterface.\n\nOther Turris routers do not have this rotate by one mapping. So add\nfunction parameter for specifying id of the first ethernet interface.\n\nSigned-off-by: Pali Rohár <pali@kernel.org>\n---\n board/CZ.NIC/turris_atsha_otp.c          | 8 ++++----\n board/CZ.NIC/turris_atsha_otp.h          | 2 +-\n board/CZ.NIC/turris_omnia/turris_omnia.c | 2 +-\n 3 files changed, 6 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/board/CZ.NIC/turris_atsha_otp.c b/board/CZ.NIC/turris_atsha_otp.c\nindex 840721a9b737..7a39b7f61d5d 100644\n--- a/board/CZ.NIC/turris_atsha_otp.c\n+++ b/board/CZ.NIC/turris_atsha_otp.c\n@@ -49,7 +49,7 @@ static void set_mac_if_invalid(int i, u8 *mac)\n \t\teth_env_set_enetaddr_by_index(\"eth\", i, mac);\n }\n \n-int turris_atsha_otp_init_mac_addresses(void)\n+int turris_atsha_otp_init_mac_addresses(int first_idx)\n {\n \tstruct udevice *dev = get_atsha204a_dev();\n \tu8 mac0[4], mac1[4], mac[6];\n@@ -81,11 +81,11 @@ int turris_atsha_otp_init_mac_addresses(void)\n \tmac[4] = mac1[2];\n \tmac[5] = mac1[3];\n \n-\tset_mac_if_invalid(1, mac);\n+\tset_mac_if_invalid((first_idx + 0) % 3, mac);\n \tincrement_mac(mac);\n-\tset_mac_if_invalid(2, mac);\n+\tset_mac_if_invalid((first_idx + 1) % 3, mac);\n \tincrement_mac(mac);\n-\tset_mac_if_invalid(0, mac);\n+\tset_mac_if_invalid((first_idx + 2) % 3, mac);\n \n \treturn 0;\n }\ndiff --git a/board/CZ.NIC/turris_atsha_otp.h b/board/CZ.NIC/turris_atsha_otp.h\nindex 667d01af7310..bd4308fdc3ef 100644\n--- a/board/CZ.NIC/turris_atsha_otp.h\n+++ b/board/CZ.NIC/turris_atsha_otp.h\n@@ -3,7 +3,7 @@\n #ifndef TURRIS_ATSHA_OTP_H\n #define TURRIS_ATSHA_OTP_H\n \n-int turris_atsha_otp_init_mac_addresses(void);\n+int turris_atsha_otp_init_mac_addresses(int first_idx);\n int turris_atsha_otp_get_serial_number(u32 *version_num, u32 *serial_num);\n \n #endif\ndiff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c\nindex 719e8750e60a..da2fee578c44 100644\n--- a/board/CZ.NIC/turris_omnia/turris_omnia.c\n+++ b/board/CZ.NIC/turris_omnia/turris_omnia.c\n@@ -606,7 +606,7 @@ int show_board_info(void)\n \n int misc_init_r(void)\n {\n-\tturris_atsha_otp_init_mac_addresses();\n+\tturris_atsha_otp_init_mac_addresses(1);\n \treturn 0;\n }\n \n",
    "prefixes": [
        "3/4"
    ]
}