Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.0/patches/2221241/?format=api
{ "id": 2221241, "url": "http://patchwork.ozlabs.org/api/1.0/patches/2221241/?format=api", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/1.0/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": "<20260408220928.3328551-5-daniel@thingy.jp>", "date": "2026-04-08T22:09:27", "name": "[v3,4/5] virtio: blk: Fix converting the vendor id to a string", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "abf40ed8d637166e5e360f925d445e67da8b1517", "submitter": { "id": 85408, "url": "http://patchwork.ozlabs.org/api/1.0/people/85408/?format=api", "name": "Daniel Palmer", "email": "daniel@thingy.jp" }, "delegate": { "id": 14103, "url": "http://patchwork.ozlabs.org/api/1.0/users/14103/?format=api", "username": "spectrum", "first_name": "Angelo", "last_name": "Dureghello", "email": "sysamfw@gmail.com" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20260408220928.3328551-5-daniel@thingy.jp/mbox/", "series": [ { "id": 499218, "url": "http://patchwork.ozlabs.org/api/1.0/series/499218/?format=api", "date": "2026-04-08T22:09:23", "name": "Add virtio-mmio support to m68k virt machine", "version": 3, "mbox": "http://patchwork.ozlabs.org/series/499218/mbox/" } ], "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2221241/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=bPT5S2RN;\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=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=\"bPT5S2RN\";\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\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)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4frchB0vthz1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 09 Apr 2026 08:10:34 +1000 (AEST)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 06E3284142;\n\tThu, 9 Apr 2026 00:10:09 +0200 (CEST)", "by phobos.denx.de (Postfix, from userid 109)\n id 532578418A; Thu, 9 Apr 2026 00:10:07 +0200 (CEST)", "from mail-pf1-x434.google.com (mail-pf1-x434.google.com\n [IPv6:2607:f8b0:4864:20::434])\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 2F8538407E\n for <u-boot@lists.denx.de>; Thu, 9 Apr 2026 00:10:03 +0200 (CEST)", "by mail-pf1-x434.google.com with SMTP id\n d2e1a72fcca58-82cf976ecacso127903b3a.1\n for <u-boot@lists.denx.de>; Wed, 08 Apr 2026 15:10:02 -0700 (PDT)", "from kinako ([2400:2200:7f0:5ee8:dac6:2cde:760c:93f])\n by smtp.googlemail.com with ESMTPSA id\n d2e1a72fcca58-82cf9b60199sm19877723b3a.25.2026.04.08.15.09.57\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 08 Apr 2026 15:10:00 -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=1775686201; x=1776291001; 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=QOt9OULTo/ICGagTQwu1OC0Y28jrkWz9xsNj87DXqXk=;\n b=bPT5S2RNQAnme6CVixo7rkW7L382kOca0npo0NPOolTOBZnNOuz3mqDv+q66c/ArHE\n fTAGi+aZGZIdRvQbrHsJoObuS2WjWbMiJ8yovSzYpGkhOfcmmwmRmMb/Ardx2dyXlQK5\n E9w5ROC3R18r+TybKHPKijaxgRXGtA4pEylIU=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775686201; x=1776291001;\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=QOt9OULTo/ICGagTQwu1OC0Y28jrkWz9xsNj87DXqXk=;\n b=MQb4ukLFkZKIRgoHijx4q/fRKMTpjcM/rMu2vpAYUOh6HcpMmcCqOrPassXCNraQTP\n SbkuDnjCxon0dw+m9JsfGwKPGPjIU5PgbqhGuA9NASbyP83vNJv6shfLR8jjSRm5nbO7\n B16byDViWbAmJAFV8gH9roxwmjX5HMXfPTWfO4T1Kkrn/n2pey6P4YHQS7e3psR9sWLg\n M3LvVZD+7W3nwIAHrw2DcejLmxNxLLemU4WnDgeEZJVIAcZ2AC9AWH5BuKx2bm/WSUdz\n DRlz1PNPtu1CS1erHweGJeUxnK4B8EYQL1GyYGFsn8LN3vpo1/XX4q+VAqaXBNqIn13J\n WNlg==", "X-Gm-Message-State": "AOJu0Yy9YPozkq/6PwuFVJrjiPOLGOUo9IrhGH16BZNqr3fgcMOTF0M/\n sk+yqHL9FJScuRrLKk4xiBF7jSJcd7e6Y4EP9+spTyxBE4ivkV9o3DhOewPtQDmxC0A=", "X-Gm-Gg": "AeBDiesY3UGPQ36QrcchWC3zVg/eHs+DDiUaom4+16ZuIpmv9GNWsVrrvkJXPpFHhqJ\n EaoMHhWen9RdQM1FkEBFr97J1B01MgSyjY2GM5IowIRS9lfwKn2dlfXImgh9ELd9TrmP7fn19jg\n h8AYEMtByVFoC/6w63GUBYGokI5slkeur5BhgeVdCXFHOG5yXMlPBgMVRK3QptxIEGJnJgjPriD\n Cp+5dRDDlxfY4sDA0xV1BiWZ2NLjuwbDKIX3Qxw5G2/QNSu2r9BweloKE7sFffZGCeDzOU/sBRb\n 0tc//Jq0c8mTHCsEjj81uxVLjUzJyuGGIuUFDyKsxm1wndxPJlbGGSU4yeYGfqqWROkEaddMHfP\n MB44gHxr2YdOfqSOADVgVK0skTwDwqn9a+A0z4YZ4J3nHudU+m2MUkq5+QCtjTPxtn6g/HRj4B7\n 9gOB/9uy3as/twdaCTf6tYh8M=", "X-Received": "by 2002:a05:6a00:1785:b0:82a:79d7:cf6 with SMTP id\n d2e1a72fcca58-82dd8944863mr1060689b3a.2.1775686200991;\n Wed, 08 Apr 2026 15:10:00 -0700 (PDT)", "From": "Daniel Palmer <daniel@thingy.jp>", "To": "visitorckw@gmail.com,\n\tangelo@kernel-space.org,\n\tbmeng.cn@gmail.com", "Cc": "u-boot@lists.denx.de,\n\tDaniel Palmer <daniel@thingy.jp>", "Subject": "[PATCH v3 4/5] virtio: blk: Fix converting the vendor id to a string", "Date": "Thu, 9 Apr 2026 07:09:27 +0900", "Message-ID": "<20260408220928.3328551-5-daniel@thingy.jp>", "X-Mailer": "git-send-email 2.51.0", "In-Reply-To": "<20260408220928.3328551-1-daniel@thingy.jp>", "References": "<20260408220928.3328551-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>\n---\n drivers/virtio/virtio_blk.c | 12 +++++-------\n include/virtio_mmio.h | 2 ++\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..d876c40deb05 100644\n--- a/drivers/virtio/virtio_blk.c\n+++ b/drivers/virtio/virtio_blk.c\n@@ -11,6 +11,7 @@\n #include <part.h>\n #include <virtio_types.h>\n #include <virtio.h>\n+#include <virtio_mmio.h>\n #include <virtio_ring.h>\n #include <linux/log2.h>\n #include \"virtio_blk.h\"\n@@ -164,14 +165,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_MMIO_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_mmio.h b/include/virtio_mmio.h\nindex 8c072826db55..cc59bc516c2c 100644\n--- a/include/virtio_mmio.h\n+++ b/include/virtio_mmio.h\n@@ -5,6 +5,8 @@\n \n #include <linux/types.h>\n \n+#define VIRTIO_MMIO_VENDOR_QEMU\t0x554d4551\n+\n struct virtio_mmio_plat {\n \tphys_addr_t base;\n };\n", "prefixes": [ "v3", "4/5" ] }