Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2222652/?format=api
{ "id": 2222652, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2222652/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260413092240.3719260-6-daniel@thingy.jp/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/1.1/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 }, "msgid": "<20260413092240.3719260-6-daniel@thingy.jp>", "date": "2026-04-13T09:22:39", "name": "[v4,5/6] virtio: blk: Fix converting the vendor id to a string", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "7d3c3f44cda289b11b9471ed15f1abd65b3cc5bc", "submitter": { "id": 85408, "url": "http://patchwork.ozlabs.org/api/1.1/people/85408/?format=api", "name": "Daniel Palmer", "email": "daniel@thingy.jp" }, "delegate": { "id": 14103, "url": "http://patchwork.ozlabs.org/api/1.1/users/14103/?format=api", "username": "spectrum", "first_name": "Angelo", "last_name": "Dureghello", "email": "sysamfw@gmail.com" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20260413092240.3719260-6-daniel@thingy.jp/mbox/", "series": [ { "id": 499674, "url": "http://patchwork.ozlabs.org/api/1.1/series/499674/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=499674", "date": "2026-04-13T09:22:34", "name": "Add virtio-mmio support to m68k virt machine", "version": 4, "mbox": "http://patchwork.ozlabs.org/series/499674/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2222652/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2222652/checks/", "tags": {}, "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=thingy.jp header.i=@thingy.jp header.a=rsa-sha256\n header.s=google header.b=FrFYGzVE;\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=none (p=none dis=none) header.from=thingy.jp", "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=thingy.jp header.i=@thingy.jp header.b=\"FrFYGzVE\";\n\tdkim-atps=neutral", "phobos.denx.de;\n dmarc=none (p=none dis=none) header.from=thingy.jp", "phobos.denx.de; spf=pass smtp.mailfrom=daniel@0x0f.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)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fvMRF25ZYz1yDF\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 13 Apr 2026 19:23:53 +1000 (AEST)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 3BF9D8421D;\n\tMon, 13 Apr 2026 11:23:23 +0200 (CEST)", "by phobos.denx.de (Postfix, from userid 109)\n id 19F8584206; Mon, 13 Apr 2026 11:23:20 +0200 (CEST)", "from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com\n [IPv6:2607:f8b0:4864:20::1029])\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 DAE82841CD\n for <u-boot@lists.denx.de>; Mon, 13 Apr 2026 11:23:16 +0200 (CEST)", "by mail-pj1-x1029.google.com with SMTP id\n 98e67ed59e1d1-35dac556bb2so2374530a91.1\n for <u-boot@lists.denx.de>; Mon, 13 Apr 2026 02:23:16 -0700 (PDT)", "from kinako ([2400:2200:776:9b18:a191:7a74:9fd8:591b])\n by smtp.googlemail.com with ESMTPSA id\n 98e67ed59e1d1-35fb617725esm1055930a91.1.2026.04.13.02.23.12\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 13 Apr 2026 02:23:15 -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=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,\n RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=no\n autolearn_force=no version=3.4.2", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=thingy.jp; s=google; t=1776072195; x=1776676995; darn=lists.denx.de;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=xoQ9KYdHgbeszQ2mA+HsiY3ZfxQ2lklXF+rc2EuvS6g=;\n b=FrFYGzVEzH0kMCcpfSu0H2J0+0oMFaJahW6BNAeDfKw3Rkh4c21yctlvQp81DhNbg7\n FtyXBP1F1Qtuo/6GsrT/CVCSJM24pvG4NyQQibEYOlg9xkIhdwUXsqqtVIS5zAYurJv1\n yO1DW1cfcQDb7Bb5zrtRM2Vs1p5C4XIJJ9JZY=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776072195; x=1776676995;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=xoQ9KYdHgbesz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n/Y3yArFW84/augLe5AMPkYspeTLgHHteDGIwbHj4Vpy5\n pwGq7FQcgEf8UKXfap14trzshU", "X-Received": "by 2002:a17:90b:3d4f:b0:35d:a5cb:95c1 with SMTP id\n 98e67ed59e1d1-35e42837793mr13224471a91.23.1776072195420;\n Mon, 13 Apr 2026 02:23:15 -0700 (PDT)", "From": "Daniel Palmer <daniel@thingy.jp>", "To": "visitorckw@gmail.com,\n\tangelo@kernel-space.org,\n\tbmeng.cn@gmail.com", "Cc": "sjg@chromium.org, u-boot@lists.denx.de, Daniel Palmer <daniel@thingy.jp>", "Subject": "[PATCH v4 5/6] virtio: blk: Fix converting the vendor id to a string", "Date": "Mon, 13 Apr 2026 18:22:39 +0900", "Message-ID": "<20260413092240.3719260-6-daniel@thingy.jp>", "X-Mailer": "git-send-email 2.51.0", "In-Reply-To": "<20260413092240.3719260-1-daniel@thingy.jp>", "References": "<20260413092240.3719260-1-daniel@thingy.jp>", "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": "Currently we are trying to work out if the vendor id is from\na virtio-mmio device and then casting a u32 to a char* and using\nit as a C-string. By chance there is usually a zero after the u32\nand it works.\n\nSince the vendor id we are trying to convert to a string is QEMU's\njust define a value for the QEMU vendor id, check if the vendor\nid matches and then use a predefined string for \"QEMU\".\n\nI don't think we should have been assumming all virtio-mmio vendor\nids are printable ASCII chars in the first place so do this special\ncasing just for QEMU. If the vendor id isn't QEMU print the hex\nvalue of it.\n\nSigned-off-by: Daniel Palmer <daniel@thingy.jp>\nReviewed-by: Simon Glass <sjg@chromium.org>\n---\n drivers/virtio/virtio_blk.c | 11 ++++-------\n include/virtio.h | 3 +++\n 2 files changed, 7 insertions(+), 7 deletions(-)", "diff": "diff --git a/drivers/virtio/virtio_blk.c b/drivers/virtio/virtio_blk.c\nindex 3dd0cf36268b..e70cf6a776b2 100644\n--- a/drivers/virtio/virtio_blk.c\n+++ b/drivers/virtio/virtio_blk.c\n@@ -164,14 +164,11 @@ static int virtio_blk_bind(struct udevice *dev)\n \t\treturn devnum;\n \tdesc->devnum = devnum;\n \tdesc->part_type = PART_TYPE_UNKNOWN;\n-\t/*\n-\t * virtio mmio transport supplies string identification for us,\n-\t * while pci trnasport uses a 2-byte subvendor value.\n-\t */\n-\tif (uc_priv->vendor >> 16)\n-\t\tsprintf(desc->vendor, \"%s\", (char *)&uc_priv->vendor);\n+\n+\tif (uc_priv->vendor == VIRTIO_VENDOR_QEMU)\n+\t\tstrcpy(desc->vendor, \"QEMU\");\n \telse\n-\t\tsprintf(desc->vendor, \"%04x\", uc_priv->vendor);\n+\t\tsprintf(desc->vendor, \"%08x\", uc_priv->vendor);\n \tdesc->bdev = dev;\n \n \t/* Indicate what driver features we support */\ndiff --git a/include/virtio.h b/include/virtio.h\nindex 17f894a79e31..3edf023463d7 100644\n--- a/include/virtio.h\n+++ b/include/virtio.h\n@@ -25,6 +25,9 @@\n #include <linux/bitops.h>\n #include <linux/bug.h>\n #include <linux/typecheck.h>\n+\n+#define VIRTIO_VENDOR_QEMU\t0x554d4551\n+\n #define VIRTIO_ID_NET\t\t1 /* virtio net */\n #define VIRTIO_ID_BLOCK\t\t2 /* virtio block */\n #define VIRTIO_ID_RNG\t\t4 /* virtio rng */\n", "prefixes": [ "v4", "5/6" ] }