{"id":2228015,"url":"http://patchwork.ozlabs.org/api/patches/2228015/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20260424192543.22614-12-philmd@linaro.org/","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/projects/14/?format=json","name":"QEMU Development","link_name":"qemu-devel","list_id":"qemu-devel.nongnu.org","list_email":"qemu-devel@nongnu.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260424192543.22614-12-philmd@linaro.org>","list_archive_url":null,"date":"2026-04-24T19:25:43","name":"[PULL,v4,55/62] hw/usb/hcd-ehci: Introduce common properties macro for sysbus and pci","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"effd25c286e5b93fac1a9a02224772ef532dfd40","submitter":{"id":85046,"url":"http://patchwork.ozlabs.org/api/people/85046/?format=json","name":"Philippe Mathieu-Daudé","email":"philmd@linaro.org"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20260424192543.22614-12-philmd@linaro.org/mbox/","series":[{"id":501401,"url":"http://patchwork.ozlabs.org/api/series/501401/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=501401","date":"2026-04-24T19:25:34","name":null,"version":4,"mbox":"http://patchwork.ozlabs.org/series/501401/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2228015/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2228015/checks/","tags":{},"related":[],"headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256\n header.s=google header.b=EozmVlPa;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g2NJK4bf8z1y2d\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 25 Apr 2026 05:27:13 +1000 (AEST)","from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wGMB8-00061n-V8; Fri, 24 Apr 2026 15:27:06 -0400","from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1wGMB7-0005w0-Va\n for qemu-devel@nongnu.org; Fri, 24 Apr 2026 15:27:06 -0400","from mail-wm1-x329.google.com ([2a00:1450:4864:20::329])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1wGMB6-0001iV-5E\n for qemu-devel@nongnu.org; Fri, 24 Apr 2026 15:27:05 -0400","by mail-wm1-x329.google.com with SMTP id\n 5b1f17b1804b1-4838c15e3cbso76951735e9.3\n for <qemu-devel@nongnu.org>; Fri, 24 Apr 2026 12:27:03 -0700 (PDT)","from localhost.localdomain (88-187-86-199.subs.proxad.net.\n [88.187.86.199]) by smtp.gmail.com with ESMTPSA id\n ffacd0b85a97d-4411c9f4f03sm32096518f8f.1.2026.04.24.12.27.01\n for <qemu-devel@nongnu.org>\n (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);\n Fri, 24 Apr 2026 12:27:01 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1777058822; x=1777663622; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:to:from:from:to:cc:subject:date:message-id\n :reply-to; bh=A+/uEeEoevz0ROSFZ2xFn8UXd3FEwdEX8cH4Moa3juA=;\n b=EozmVlPa9wxIa/yAEG3qcrV77AsmQ8USEjynR2kZQq17plsnMayKvuhpHIq5ZGt9yU\n M5YznHEtqm1lbWLht9/MdPxmgH1QbhgP2h/OR8pHNbO8FbDpsRjItt0GQnDo8AzE7Wef\n Q/0oeKp0AdyWqjNIcNg8EkVDw4me8r8U17WzaQqLIS1jU4k15JYyUB+ID9OlQgdS+gKb\n dt7wqT6Ix7UOKYbbO4toRCHQ+R9QTy3lAv9pqFu3D7knWi57HvE1DCuWxoRodKFc1Cn+\n fdL+LyiSg36sEoYTB/zYC9cxHr+KotvMfgQT4AqdWTkDa5brWyS6PJ+Tw1hIuR+IrQgz\n Wpyw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777058822; x=1777663622;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to\n :cc:subject:date:message-id:reply-to;\n bh=A+/uEeEoevz0ROSFZ2xFn8UXd3FEwdEX8cH4Moa3juA=;\n b=O7KNc1XH9OG/5D2ifuWnzv2bfn0auIr4yMYs39uKjLCyf0Zku5z4xMw4xuesZtKhCH\n OgVBIzOwrVjc4MYsQMyxBdbL5D8gAUPX5a9ji2gyDu4M54jdo9kHmIFfj0BLDppsSHYp\n ns3IUnUQ/40GwGJv2K1H9Ms2sR+TiHwmvVU3ncjTlkhGKdX8nnJZUhSr6A7E18rN9rwE\n Rj5zxHNuXUJl2wduX2LxdqAg9j6saAM62uU1tmBgKC9z39NhcQ7lPNLrMzROR4u7lFxI\n o3iXyBNEV6zEz94f2E/mj1wsztbclJT3kUbMU9yQ6OUIU3SOqBHnc09dz5oQ8ULgeYWX\n msSg==","X-Gm-Message-State":"AOJu0YyKxPlXQApefzFRnYt7Y0b1o6qh+7hFSmNZS1mDgH3/KyWjDYZJ\n aGFUjj8/tADxAAhngWXmyxtbS0bIxI4Xt4xIP+3YBHFYQDZfA7YIXdRQttNieGTOqAD9u8Bf5pV\n uN3utnuk=","X-Gm-Gg":"AeBDietYLlv3I0jDvicxJx2gmhCcj+VDCxGd2s2elC9h6mlVLFQjXwyp5ioXEC0CGtE\n Rdyi/9LKGHMhRaZXRCMjv9FA3u2iDPv7CxQ5MRciH3nAqK5WyovESHREykv7M86q45QOdDy3CaS\n v6PMVu9xLVI0Xs86IvLoBPUbTJj6G564b+GCQGDAEqiRVnrWN/qTvTCI49w0TffM2ZUCNJadmvb\n fUHmKK7OiXa+2TzrOibzMoPjWSDtgH9oeRZ3grZl991bpDLP41oEQisJfglB4jESGorJfQF99+h\n le+A1iK/ICgwP7c9493hx6e44BrFtyZ+fyZcZF6I/WnB3SIF759P46QZTjSjJEO8tSrJeMRnM6m\n rg4qwM/Xt8NTbf5g0PgiprhfCWlQICGKtkQIpNRn9+3s2Esz5DRPqSHyLo1h4AcnkqGoskofWOB\n a4VYD+GdnVD7yCJC5Mna04xhn3iS0ZEUuVdYvogtH52Y5HQQ0dfO8k7NR6rrAneX/6/nccPWyy/\n v0QAob53lY=","X-Received":"by 2002:a05:600c:8586:b0:489:e49:f766 with SMTP id\n 5b1f17b1804b1-4890e49f7d8mr255953445e9.17.1777058822061;\n Fri, 24 Apr 2026 12:27:02 -0700 (PDT)","From":"=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>","To":"qemu-devel@nongnu.org","Subject":"[PULL v4 55/62] hw/usb/hcd-ehci: Introduce common properties macro\n for sysbus and pci","Date":"Fri, 24 Apr 2026 21:25:43 +0200","Message-ID":"<20260424192543.22614-12-philmd@linaro.org>","X-Mailer":"git-send-email 2.53.0","In-Reply-To":"<20260424192543.22614-1-philmd@linaro.org>","References":"<20260424192543.22614-1-philmd@linaro.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Received-SPF":"pass client-ip=2a00:1450:4864:20::329;\n envelope-from=philmd@linaro.org; helo=mail-wm1-x329.google.com","X-Spam_score_int":"-20","X-Spam_score":"-2.1","X-Spam_bar":"--","X-Spam_report":"(-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 autolearn=ham autolearn_force=no","X-Spam_action":"no action","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"qemu development <qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<https://lists.nongnu.org/archive/html/qemu-devel>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"},"content":"From: Jamin Lin <jamin_lin@aspeedtech.com>\n\nEHCI properties are currently defined separately in both sysbus and\nPCI implementations, leading to duplicated code for common fields\nsuch as \"maxframes\".\n\nIntroduce DEFINE_EHCI_COMMON_PROPERTIES() to consolidate shared\nproperty definitions and reuse them across both EHCISysBusState\nand EHCIPCIState.\n\nThis reduces code duplication and keeps property definitions\nconsistent between different EHCI device variants.\n\nNo functional change.\n\nSigned-off-by: Jamin Lin <jamin_lin@aspeedtech.com>\nReviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>\nMessage-ID: <20260424080508.53992-8-jamin_lin@aspeedtech.com>\nSigned-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>\n---\n hw/usb/hcd-ehci.h        | 3 +++\n hw/usb/hcd-ehci-pci.c    | 2 +-\n hw/usb/hcd-ehci-sysbus.c | 2 +-\n 3 files changed, 5 insertions(+), 2 deletions(-)","diff":"diff --git a/hw/usb/hcd-ehci.h b/hw/usb/hcd-ehci.h\nindex 4234591cb41..d038ee1e310 100644\n--- a/hw/usb/hcd-ehci.h\n+++ b/hw/usb/hcd-ehci.h\n@@ -307,6 +307,9 @@ struct EHCIState {\n     VMChangeStateEntry *vmstate;\n };\n \n+#define DEFINE_EHCI_COMMON_PROPERTIES(_state) \\\n+    DEFINE_PROP_UINT32(\"maxframes\", _state, ehci.maxframes, 128)\n+\n extern const VMStateDescription vmstate_ehci;\n \n void usb_ehci_init(EHCIState *s, DeviceState *dev);\ndiff --git a/hw/usb/hcd-ehci-pci.c b/hw/usb/hcd-ehci-pci.c\nindex 9febcc10314..fd35d253407 100644\n--- a/hw/usb/hcd-ehci-pci.c\n+++ b/hw/usb/hcd-ehci-pci.c\n@@ -136,7 +136,7 @@ static void usb_ehci_pci_write_config(PCIDevice *dev, uint32_t addr,\n }\n \n static const Property ehci_pci_properties[] = {\n-    DEFINE_PROP_UINT32(\"maxframes\", EHCIPCIState, ehci.maxframes, 128),\n+    DEFINE_EHCI_COMMON_PROPERTIES(EHCIPCIState),\n };\n \n static const VMStateDescription vmstate_ehci_pci = {\ndiff --git a/hw/usb/hcd-ehci-sysbus.c b/hw/usb/hcd-ehci-sysbus.c\nindex b31032bbf39..7f7c7f8a2f1 100644\n--- a/hw/usb/hcd-ehci-sysbus.c\n+++ b/hw/usb/hcd-ehci-sysbus.c\n@@ -31,7 +31,7 @@ static const VMStateDescription vmstate_ehci_sysbus = {\n };\n \n static const Property ehci_sysbus_properties[] = {\n-    DEFINE_PROP_UINT32(\"maxframes\", EHCISysBusState, ehci.maxframes, 128),\n+    DEFINE_EHCI_COMMON_PROPERTIES(EHCISysBusState),\n     DEFINE_PROP_BOOL(\"companion-enable\", EHCISysBusState, ehci.companion_enable,\n                      false),\n };\n","prefixes":["PULL","v4","55/62"]}