Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2177490/?format=api
{ "id": 2177490, "url": "http://patchwork.ozlabs.org/api/patches/2177490/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20251225153721.1217202-1-trini@konsulko.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": "<20251225153721.1217202-1-trini@konsulko.com>", "list_archive_url": null, "date": "2025-12-25T15:37:21", "name": "net: tftpput: Rework to exclude code from xPL phases", "commit_ref": "c832cd3b49a51e34c3672201881f3da64df45031", "pull_url": null, "state": "accepted", "archived": false, "hash": "96afa58a93c8cb5f5f59c712fcb3f3b464c1331d", "submitter": { "id": 65875, "url": "http://patchwork.ozlabs.org/api/people/65875/?format=api", "name": "Tom Rini", "email": "trini@konsulko.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/20251225153721.1217202-1-trini@konsulko.com/mbox/", "series": [ { "id": 486450, "url": "http://patchwork.ozlabs.org/api/series/486450/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=486450", "date": "2025-12-25T15:37:21", "name": "net: tftpput: Rework to exclude code from xPL phases", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/486450/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2177490/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2177490/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 (1024-bit key;\n unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256\n header.s=google header.b=cMdVdjCI;\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=konsulko.com", "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de", "phobos.denx.de;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=konsulko.com header.i=@konsulko.com\n header.b=\"cMdVdjCI\";\n\tdkim-atps=neutral", "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=konsulko.com", "phobos.denx.de;\n spf=pass smtp.mailfrom=trini@konsulko.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 4dcXtj58xdz1xyf\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 26 Dec 2025 02:37:33 +1100 (AEDT)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 70F0B84372;\n\tThu, 25 Dec 2025 16:37:28 +0100 (CET)", "by phobos.denx.de (Postfix, from userid 109)\n id 95BD384375; Thu, 25 Dec 2025 16:37:27 +0100 (CET)", "from mail-oa1-x32.google.com (mail-oa1-x32.google.com\n [IPv6:2001:4860:4864:20::32])\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 13BBB84371\n for <u-boot@lists.denx.de>; Thu, 25 Dec 2025 16:37:25 +0100 (CET)", "by mail-oa1-x32.google.com with SMTP id\n 586e51a60fabf-3f584ab62c6so2771977fac.1\n for <u-boot@lists.denx.de>; Thu, 25 Dec 2025 07:37:25 -0800 (PST)", "from bill-the-cat.. (fixed-189-203-103-235.totalplay.net.\n [189.203.103.235]) by smtp.gmail.com with ESMTPSA id\n 006d021491bc7-65d0f6eb26fsm12473073eaf.14.2025.12.25.07.37.22\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 25 Dec 2025 07:37:23 -0800 (PST)" ], "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 SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=konsulko.com; s=google; t=1766677044; x=1767281844; darn=lists.denx.de;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:from:to:cc:subject:date:message-id:reply-to;\n bh=7FKp5ax4YBNkiSBfKTM7AwrAThK6Ycz7jEyRteP2rd0=;\n b=cMdVdjCI6pru744JOqX/MK2GdgapoZXlMMi2a2KXTwZCtz+NHkY5oTF5hTiPftWWD4\n xBOfiIlbvCC+LzYxi2/kK23JGSs7kChgy4taml9NEDQEFNyw+j9LrUfw3AQtOwDls1sZ\n XRS3yX3a1oXM47aGeq0Qz/+HPRIXj3slw74Y4=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1766677044; x=1767281844;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to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tn+x9NfKBASMfYgi1vE", "X-Google-Smtp-Source": "\n AGHT+IGde6AZj3Irdh2vdxqLEtZXh+G8C6wqhP00W/jxj+fwXcSDYnuwISgVjzc+ASo72TRu2quQiw==", "X-Received": "by 2002:a4a:e602:0:b0:65d:bee:4c7 with SMTP id\n 006d021491bc7-65d0eb1f940mr6361106eaf.42.1766677043718;\n Thu, 25 Dec 2025 07:37:23 -0800 (PST)", "From": "Tom Rini <trini@konsulko.com>", "To": "u-boot@lists.denx.de", "Cc": "Jerome Forissier <jerome.forissier@arm.com>", "Subject": "[PATCH] net: tftpput: Rework to exclude code from xPL phases", "Date": "Thu, 25 Dec 2025 09:37:21 -0600", "Message-ID": "<20251225153721.1217202-1-trini@konsulko.com>", "X-Mailer": "git-send-email 2.43.0", "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": "Given how the support for CONFIG_CMD_TFTPPUT is woven through the\nsupport for the tftp protocol we currently end up including \"put\"\nsupport in xPL phases, if enabled. This in turn can lead to size\noverflow on those platforms as xPL tends to be constrained. To resolve\nthis, use \"CMD_TFTPPUT\" in the code to check for both CONFIG_CMD_TFTPPUT\nbeing true and not being in an xPL build phase.\n\nSigned-off-by: Tom Rini <trini@konsulko.com>\n---\nCc: Jerome Forissier <jerome.forissier@arm.com>\n---\n net/tftp.c | 31 ++++++++++++++++++++-----------\n 1 file changed, 20 insertions(+), 11 deletions(-)", "diff": "diff --git a/net/tftp.c b/net/tftp.c\nindex 3b0f4cd2006e..78ec44159c1b 100644\n--- a/net/tftp.c\n+++ b/net/tftp.c\n@@ -22,6 +22,15 @@\n \n DECLARE_GLOBAL_DATA_PTR;\n \n+/*\n+ * We cannot use the 'tftpput' command in xPL phases. Given how the\n+ * support is integrated in the code, this is how we disable that support\n+ * in xPL.\n+ */\n+#if defined(CONFIG_CMD_TFTPPUT) && !defined(CONFIG_XPL_BUILD)\n+#define CMD_TFTPPUT\n+#endif\n+\n /* Well known TFTP port # */\n #define WELL_KNOWN_PORT\t69\n /* Millisecs to timeout for lost pkt */\n@@ -95,7 +104,7 @@ static ushort\ttftp_windowsize;\n static ushort\ttftp_next_ack;\n /* Last nack block we send */\n static ushort\ttftp_last_nack;\n-#ifdef CONFIG_CMD_TFTPPUT\n+#ifdef CMD_TFTPPUT\n /* 1 if writing, else 0 */\n static int\ttftp_put_active;\n /* 1 if we have sent the last block */\n@@ -183,13 +192,13 @@ static void new_transfer(void)\n \ttftp_prev_block = 0;\n \ttftp_block_wrap = 0;\n \ttftp_block_wrap_offset = 0;\n-#ifdef CONFIG_CMD_TFTPPUT\n+#ifdef CMD_TFTPPUT\n \ttftp_put_final_block_sent = 0;\n #endif\n \tled_activity_blink();\n }\n \n-#ifdef CONFIG_CMD_TFTPPUT\n+#ifdef CMD_TFTPPUT\n /**\n * Load the next block from memory to be sent over tftp.\n *\n@@ -329,7 +338,7 @@ static void tftp_send(void)\n \tcase STATE_SEND_WRQ:\n \t\txp = pkt;\n \t\ts = (ushort *)pkt;\n-#ifdef CONFIG_CMD_TFTPPUT\n+#ifdef CMD_TFTPPUT\n \t\t*s++ = htons(tftp_state == STATE_SEND_RRQ ? TFTP_RRQ :\n \t\t\tTFTP_WRQ);\n #else\n@@ -372,7 +381,7 @@ static void tftp_send(void)\n \t\ts[0] = htons(TFTP_ACK);\n \t\ts[1] = htons(tftp_cur_block);\n \t\tpkt = (uchar *)(s + 2);\n-#ifdef CONFIG_CMD_TFTPPUT\n+#ifdef CMD_TFTPPUT\n \t\tif (tftp_put_active) {\n \t\t\tint toload = tftp_block_size;\n \t\t\tint loaded = load_block(tftp_cur_block, pkt, toload);\n@@ -437,7 +446,7 @@ static void tftp_send(void)\n \t\tnet_set_state(NETLOOP_FAIL);\n }\n \n-#ifdef CONFIG_CMD_TFTPPUT\n+#ifdef CMD_TFTPPUT\n static void icmp_handler(unsigned type, unsigned code, unsigned dest,\n \t\t\t struct in_addr sip, unsigned src, uchar *pkt,\n \t\t\t unsigned len)\n@@ -476,7 +485,7 @@ static void tftp_handler(uchar *pkt, unsigned dest, struct in_addr sip,\n \t\tbreak;\n \n \tcase TFTP_ACK:\n-#ifdef CONFIG_CMD_TFTPPUT\n+#ifdef CMD_TFTPPUT\n \t\tif (tftp_put_active) {\n \t\t\ttimeout_count = 0;\n \t\t\tif (tftp_put_final_block_sent) {\n@@ -578,7 +587,7 @@ static void tftp_handler(uchar *pkt, unsigned dest, struct in_addr sip,\n \n \t\ttftp_next_ack = tftp_windowsize;\n \n-#ifdef CONFIG_CMD_TFTPPUT\n+#ifdef CMD_TFTPPUT\n \t\tif (tftp_put_active && tftp_state == STATE_OACK) {\n \t\t\t/* Get ready to send the first block */\n \t\t\ttftp_state = STATE_DATA;\n@@ -854,7 +863,7 @@ void tftp_start(enum proto_t protocol)\n \t\t\ttftp_block_size_option = TFTP_MTU_BLOCKSIZE6;\n \t} else {\n \t\tprintf(\"TFTP %s server %pI4; our IP address is %pI4\",\n-#ifdef CONFIG_CMD_TFTPPUT\n+#ifdef CMD_TFTPPUT\n \t protocol == TFTPPUT ? \"to\" : \"from\",\n #else\n \t \"from\",\n@@ -888,7 +897,7 @@ void tftp_start(enum proto_t protocol)\n \t}\n \n \tputc('\\n');\n-#ifdef CONFIG_CMD_TFTPPUT\n+#ifdef CMD_TFTPPUT\n \ttftp_put_active = (protocol == TFTPPUT);\n \tif (tftp_put_active) {\n \t\tprintf(\"Save address: 0x%lx\\n\", image_save_addr);\n@@ -911,7 +920,7 @@ void tftp_start(enum proto_t protocol)\n \n \tnet_set_timeout_handler(timeout_ms, tftp_timeout_handler);\n \tnet_set_udp_handler(tftp_handler);\n-#ifdef CONFIG_CMD_TFTPPUT\n+#ifdef CMD_TFTPPUT\n \tnet_set_icmp_handler(icmp_handler);\n #endif\n \ttftp_remote_port = WELL_KNOWN_PORT;\n", "prefixes": [] }