Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2223878/?format=api
{ "id": 2223878, "url": "http://patchwork.ozlabs.org/api/patches/2223878/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260416093927.602613-8-daniel@thingy.jp/", "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": "<20260416093927.602613-8-daniel@thingy.jp>", "list_archive_url": null, "date": "2026-04-16T09:39:26", "name": "[v5,7/8] 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/people/85408/?format=api", "name": "Daniel Palmer", "email": "daniel@thingy.jp" }, "delegate": { "id": 14103, "url": "http://patchwork.ozlabs.org/api/users/14103/?format=api", "username": "spectrum", "first_name": "Angelo", "last_name": "Dureghello", "email": "sysamfw@gmail.com" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20260416093927.602613-8-daniel@thingy.jp/mbox/", "series": [ { "id": 500127, "url": "http://patchwork.ozlabs.org/api/series/500127/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=500127", "date": "2026-04-16T09:39:20", "name": "Add virtio-mmio support to m68k virt machine", "version": 5, "mbox": "http://patchwork.ozlabs.org/series/500127/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2223878/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2223878/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=thingy.jp header.i=@thingy.jp header.a=rsa-sha256\n header.s=google header.b=GkSgMdhN;\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=\"GkSgMdhN\";\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 4fxCgx6d30z1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 16 Apr 2026 19:41:17 +1000 (AEST)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 0A8FD84285;\n\tThu, 16 Apr 2026 11:40:21 +0200 (CEST)", "by phobos.denx.de (Postfix, from userid 109)\n id 92DE98407E; Thu, 16 Apr 2026 11:40:16 +0200 (CEST)", "from mail-pg1-x532.google.com (mail-pg1-x532.google.com\n [IPv6:2607:f8b0:4864:20::532])\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 AA71084277\n for <u-boot@lists.denx.de>; Thu, 16 Apr 2026 11:40:13 +0200 (CEST)", "by mail-pg1-x532.google.com with SMTP id\n 41be03b00d2f7-c6e2355739dso3537248a12.2\n for <u-boot@lists.denx.de>; Thu, 16 Apr 2026 02:40:13 -0700 (PDT)", "from kinako.work.home.arpa\n (p1329195-ipxg00a01sizuokaden.shizuoka.ocn.ne.jp. [114.145.5.195])\n by smtp.googlemail.com with ESMTPSA id\n 41be03b00d2f7-c79581a2fc2sm4423568a12.21.2026.04.16.02.40.10\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 16 Apr 2026 02:40:11 -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=1776332412; x=1776937212; 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=Nvel3xKllIvYyfxsg1GFyovNvU44g56KlYEeybkcgXQ=;\n b=GkSgMdhN8sob0nuWo0J1g5PQLJ/Wwy4axlVLbfrhwlj38Es0tD5LdH5VD1TSFlNH8q\n VBNSB8CgDnLs4KuLVneKeSLv2JObjtKc3iPoXgs215dXV60BCSroQDXXl5Y1aTbF0Z9x\n Sd2bw9ba9DHEbzec2Vb8XxOUiRfXJeQlC61wY=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776332412; x=1776937212;\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=Nvel3xKllIvYyfxsg1GFyovNvU44g56KlYEeybkcgXQ=;\n b=MMM3auj9hF8JP4hoT1aVZD3M1Y98wz+1asPkwkf08wTILK3jGA5W8nXN39zGl/KaTj\n wSIh/ZsCL0n89kx+39x8MQSYeSRevX1ui5jqjmh1P0ogWHVy25xx7IKdGC8f/y/X36WS\n G36Lg+9Ecj5wjLx2swGjJbP1JYi73wuLtREa6jjYuQK0FijX89yBKKe+n8cB3EYQjIUk\n AUGYzOrL0FtdxK2x+5Qd6Qiysok72HPvabe3JLRqridUXks/HQXOclazrViQSLcMSV+I\n 8FYvXZ5sYhMQs0dvzdrjyMjs87XxnDSAxntNX9CmBDOEMlM7FpdEFMHBB07/znFR2vdA\n SrCg==", "X-Forwarded-Encrypted": "i=1;\n AFNElJ9a2IFjHdFljhq6dDPwe60fpPTpWeGyjExsYxmiEXNjN/bHV4dQ1boPan+iUBWB/LUREr2gN/c=@lists.denx.de", "X-Gm-Message-State": "AOJu0Yxy/8oGDXm5E0u1xabIWxX9JX0s30fW4WqAP2LXx6MHKFrubwp3\n 2pAOgkggo1VPtOfr52QFqiX3DBqRKSMnPdL1/0hJ2ImsONrVSm9X/8OfSqivQa519lo=", "X-Gm-Gg": "AeBDiete4zpUA7qHWbok9W5kg2nN2jkMW5d1fgjsqQ+clqchMumQL45aoL7mMXGl5Wj\n AKKkFnWgUfOk5/dck9weLBSVUxwaUN+utEeBwSzTo5qbZrkS+/g5fZtqLcq8yqlMoPvmP2Ptsnp\n 3SfkEt2B8mTuQ3O2I+ZdCwxo+Yz9OmCoOFAXYVYF08N8G0HpsZDLrJ4YDsovNVZ55daOVBTzIzv\n OeV+jo06m25kwd9s6Yj5tgvEhQBUp7pQXLEkWmfxknY8rZLg52AnS0EmxX8g2hcHqgwO6z5BCcK\n jKI66Nts0JGc7B9ElNekohr4+wJg03mZ6hoEpAOWx+ksNJAmMBWhiT8nN4DQ+9Ggf2ZSkxsMg2s\n NBDu6KJ1SbwFu2rT1xOk5AwDd26km9xk/yXa1K8p5aEPqhnKcTp9NPiWdjQn9mnEB/G9EZp+P0F\n QHYVjVSsmv2Vzjni9X851k95rQ/xP2VBwNYaeAjGb1LPGk9Quq4EOQy0J/DB4ogiYhAwvTJigY3\n C70iQ/SvNbW+90Rl6g9I+FQ", "X-Received": "by 2002:a05:6a20:7f9e:b0:39f:2ad9:e547 with SMTP id\n adf61e73a8af0-39fe376980cmr26471418637.0.1776332412149;\n Thu, 16 Apr 2026 02:40:12 -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 v5 7/8] virtio: blk: Fix converting the vendor id to a string", "Date": "Thu, 16 Apr 2026 18:39:26 +0900", "Message-ID": "<20260416093927.602613-8-daniel@thingy.jp>", "X-Mailer": "git-send-email 2.51.0", "In-Reply-To": "<20260416093927.602613-1-daniel@thingy.jp>", "References": "<20260416093927.602613-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\nReviewed-by: Simon Glass <sjg@chromium.org>\nReviewed-by: Kuan-Wei Chiu <visitorckw@gmail.com>\nSigned-off-by: Daniel Palmer <daniel@thingy.jp>\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": [ "v5", "7/8" ] }