{"id":2220154,"url":"http://patchwork.ozlabs.org/api/1.1/patches/2220154/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/patch/20260406142411.2992618-4-daniel@thingy.jp/","project":{"id":18,"url":"http://patchwork.ozlabs.org/api/1.1/projects/18/?format=json","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":"<20260406142411.2992618-4-daniel@thingy.jp>","date":"2026-04-06T14:24:09","name":"[v2,3/5] virtio: mmio: Keep vendor id little endian","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"e0fec47342716b3cdcb68784ad47f12ee08d7cd8","submitter":{"id":85408,"url":"http://patchwork.ozlabs.org/api/1.1/people/85408/?format=json","name":"Daniel Palmer","email":"daniel@thingy.jp"},"delegate":{"id":14103,"url":"http://patchwork.ozlabs.org/api/1.1/users/14103/?format=json","username":"spectrum","first_name":"Angelo","last_name":"Dureghello","email":"sysamfw@gmail.com"},"mbox":"http://patchwork.ozlabs.org/project/uboot/patch/20260406142411.2992618-4-daniel@thingy.jp/mbox/","series":[{"id":498861,"url":"http://patchwork.ozlabs.org/api/1.1/series/498861/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/list/?series=498861","date":"2026-04-06T14:24:06","name":"Add virtio-mmio support to m68k virt machine","version":2,"mbox":"http://patchwork.ozlabs.org/series/498861/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2220154/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2220154/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=OIQvds9b;\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=\"OIQvds9b\";\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 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fqBS22mznz1xy1\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 07 Apr 2026 00:25:06 +1000 (AEST)","from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id E80BF83EC6;\n\tMon,  6 Apr 2026 16:24:37 +0200 (CEST)","by phobos.denx.de (Postfix, from userid 109)\n id 3E1908352B; Mon,  6 Apr 2026 16:24:37 +0200 (CEST)","from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com\n [IPv6:2607:f8b0:4864:20::52c])\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 1991C8405F\n for <u-boot@lists.denx.de>; Mon,  6 Apr 2026 16:24:35 +0200 (CEST)","by mail-pg1-x52c.google.com with SMTP id\n 41be03b00d2f7-c76b0cda2aeso1512378a12.2\n for <u-boot@lists.denx.de>; Mon, 06 Apr 2026 07:24:35 -0700 (PDT)","from kinako.work.home.arpa\n (p1866070-ipxg00f01sizuokaden.shizuoka.ocn.ne.jp. [180.1.30.70])\n by smtp.googlemail.com with ESMTPSA id\n d9443c01a7336-2b27478cb4fsm156885295ad.29.2026.04.06.07.24.31\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 06 Apr 2026 07:24:33 -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=1775485473; x=1776090273; 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=QvY6rMqtz4X518COuQ10zUdJPlmfu0QsTYJzfAaMLOs=;\n b=OIQvds9b0AjKmDCsI6WOcCmhj0YIX/AaNjFNq332ynTFxDwtRt/EZHJRZi8sUXC/oN\n pH1sRN5qC4gTAsLyrmMNy+fUF1mmGaRy/7QOOKwC7MUNSlJX8eQ5Cl2wWCZCYpTY7/OT\n OgQkTiEgoh9tZY5f7+UIOBityQ4WYfBVyg3J0=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775485473; x=1776090273;\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=QvY6rMqtz4X518COuQ10zUdJPlmfu0QsTYJzfAaMLOs=;\n b=VAil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2:49a7:a5c4 with SMTP id\n d9443c01a7336-2b2818b00ccmr116069805ad.27.1775485473573;\n Mon, 06 Apr 2026 07:24:33 -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 v2 3/5] virtio: mmio: Keep vendor id little endian","Date":"Mon,  6 Apr 2026 23:24:09 +0900","Message-ID":"<20260406142411.2992618-4-daniel@thingy.jp>","X-Mailer":"git-send-email 2.51.0","In-Reply-To":"<20260406142411.2992618-1-daniel@thingy.jp>","References":"<20260406142411.2992618-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":"The vendor id is used as a little endian value but it gets\nswapped to the CPU endian in readl(). Swap it back to le\nto avoid the below weird output from `virtio info`.\n\nDevice 0: UMEQ VirtIO Block Device\n            Type: Hard Disk\n            Capacity: 1.0 MB = 0.0 GB (2056 x 512)\n\nSigned-off-by: Daniel Palmer <daniel@thingy.jp>\n---\n drivers/virtio/virtio_mmio.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)","diff":"diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c\nindex 1cd737aca249..ddf873fa96fb 100644\n--- a/drivers/virtio/virtio_mmio.c\n+++ b/drivers/virtio/virtio_mmio.c\n@@ -374,7 +374,7 @@ static int virtio_mmio_probe(struct udevice *udev)\n \t\t */\n \t\treturn 0;\n \t}\n-\tuc_priv->vendor = readl(priv->base + VIRTIO_MMIO_VENDOR_ID);\n+\tuc_priv->vendor = cpu_to_le32(readl(priv->base + VIRTIO_MMIO_VENDOR_ID));\n \n \tif (priv->version == 1)\n \t\twritel(PAGE_SIZE, priv->base + VIRTIO_MMIO_GUEST_PAGE_SIZE);\n","prefixes":["v2","3/5"]}