From nobody Tue Feb 10 19:00:24 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1674730216; cv=none; d=zohomail.com; s=zohoarc; b=HKDXbfiWABOeb6bUNLvwVLMNTafFwDcgZB7pYtyWMBgj2isyo+aZJC41EOU5iIRkuPFDhhEqVAVaKgNvjTvpAZ574P9wB7Gut/XV4YDQBZ9XW9omSUBjwVMKTqhFrQI7tmjPzewcid9GAbzzOSnLf2pcgC8uH2Lb9/Of+R/lp0k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1674730216; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject; bh=2TXcfvyQzXAA7MGVWAEaiJaTJw6CggHuTf+FoxIGKhw=; b=ROVa++/rBuhF2atDDw1cPxXjuy0BL3JUIQJqWh5lypGU3ZYjAGENuCKq7Ry6P1u+BgJ3IMdYl5Vq1dnKwANJnuS0cEUV1PQiC0cMPsaKCGeHsXAYp3WHIce9RXSuC5rpOhs3TsgnKPwSsSi7D2Q8fZ25LojEIcCAG/elJ3a0Ttc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 167473021650158.4206284036693; Thu, 26 Jan 2023 02:50:16 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pKznx-0004DJ-8v; Thu, 26 Jan 2023 05:48:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pKznY-0002w2-U5 for qemu-devel@nongnu.org; Thu, 26 Jan 2023 05:48:06 -0500 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pKznX-0005aa-7z for qemu-devel@nongnu.org; Thu, 26 Jan 2023 05:48:04 -0500 Received: by mail-pl1-x62e.google.com with SMTP id a18so1500768plm.2 for ; Thu, 26 Jan 2023 02:48:02 -0800 (PST) Received: from alarm.flets-east.jp ([2400:4050:a840:1e00:4457:c267:5e09:481b]) by smtp.gmail.com with ESMTPSA id s8-20020a63af48000000b0046b1dabf9a8sm496789pgo.70.2023.01.26.02.47.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Jan 2023 02:48:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2TXcfvyQzXAA7MGVWAEaiJaTJw6CggHuTf+FoxIGKhw=; b=T8/2UqyHwcEa6wkjUfyNinUBEQxQBZDED97LFlty8RDToINgLbjYcTiWBWDwG3+/Pq Qe+HAzzyLo5zYG2TkL3Lrojzgfp4WeZrNxgygkppGPmpiuwdTDMMt7FO6+rULHt9Ltyn omdXvU+8+KX86odZ992SLyGm12ZbtgrWmBvVH1wwrZJADWZCJi54SaVEwYZH0+DqLkmV redqIVlPTeJL6TPDC9kLZQf+7MC/StR8gZ+93NuAh6y+TVg2pGVvOVbVOkEXZ8ko61jI HI0cYxVC5zShan8itwgDJsQ2zZQJ+yOaU98bpF8a44l0m54A9vRRgrJ03Xz3ODKBJFIi J48Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2TXcfvyQzXAA7MGVWAEaiJaTJw6CggHuTf+FoxIGKhw=; b=HQWNmD89VGvJqLslCLR4ZcRLlZdi+QtbVGczQ7IwRH7ZjCO42FQAylcRle0DiE0RP5 H23N7L9s8v7jqIrSrTV3Z9emCT3xiIQEMYERQHfb8ZetLMTlA1d2MsnRiMHfXf4/VV2d imWKOaEk6ATjaDZmWbB3GC20p2L1803b5jbtkyW/8MQYateg6pV+s4GOk24gRX7Vbgxd +VrtJWMZt4afGVXRH0Z6a42nFRAqDW5qEogkc7MalRUC2CIBnwl25i5/XKgrPT5DdlXV eIGCywkBhdZjk0O0whrv8WqtW07SzHn91wX1Bvuhnla3D5BVlG8zj9X0tGTKIdpGd04H HnsA== X-Gm-Message-State: AFqh2kpDkrbIqa/p4ziTGKXdsYu7acMmKn2vPsQLN3vL4yNDlXsjx+QZ 9jX57hRwVmcSJ1quIlUE7N/ezw== X-Google-Smtp-Source: AMrXdXshLPoGyaZt2IaC1TzYpbZTzAdAeMdMWjXovSL8ljNJemS/p1yWtB+olCEL7KNmWz52b7K8vg== X-Received: by 2002:a05:6a21:6d9e:b0:b3:bf50:9168 with SMTP id wl30-20020a056a216d9e00b000b3bf509168mr48762014pzb.38.1674730081913; Thu, 26 Jan 2023 02:48:01 -0800 (PST) From: Akihiko Odaki To: Cc: Jason Wang , Dmitry Fleytman , Thomas Huth , Laurent Vivier , Paolo Bonzini , qemu-devel@nongnu.org, qemu-ppc@nongnu.org, "Michael S . Tsirkin" , Yan Vugenfirer , Yuri Benditovich , Sriram Yagnaraman , Akihiko Odaki , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v3 14/26] e1000e: Configure ResettableClass Date: Thu, 26 Jan 2023 19:46:53 +0900 Message-Id: <20230126104705.35023-15-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230126104705.35023-1-akihiko.odaki@daynix.com> References: <20230126104705.35023-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=2607:f8b0:4864:20::62e; envelope-from=akihiko.odaki@daynix.com; helo=mail-pl1-x62e.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @daynix-com.20210112.gappssmtp.com) X-ZM-MESSAGEID: 1674730216738100001 This is part of recent efforts of refactoring e1000 and e1000e. DeviceClass's reset member is deprecated so migrate to ResettableClass. There is no behavioral difference. Signed-off-by: Akihiko Odaki Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/net/e1000e.c | 10 ++++++---- hw/net/trace-events | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/hw/net/e1000e.c b/hw/net/e1000e.c index 0bc222d354..ec274319c4 100644 --- a/hw/net/e1000e.c +++ b/hw/net/e1000e.c @@ -513,11 +513,11 @@ static void e1000e_pci_uninit(PCIDevice *pci_dev) msi_uninit(pci_dev); } =20 -static void e1000e_qdev_reset(DeviceState *dev) +static void e1000e_qdev_reset_hold(Object *obj) { - E1000EState *s =3D E1000E(dev); + E1000EState *s =3D E1000E(obj); =20 - trace_e1000e_cb_qdev_reset(); + trace_e1000e_cb_qdev_reset_hold(); =20 e1000e_core_reset(&s->core); =20 @@ -669,6 +669,7 @@ static Property e1000e_properties[] =3D { static void e1000e_class_init(ObjectClass *class, void *data) { DeviceClass *dc =3D DEVICE_CLASS(class); + ResettableClass *rc =3D RESETTABLE_CLASS(class); PCIDeviceClass *c =3D PCI_DEVICE_CLASS(class); =20 c->realize =3D e1000e_pci_realize; @@ -679,8 +680,9 @@ static void e1000e_class_init(ObjectClass *class, void = *data) c->romfile =3D "efi-e1000e.rom"; c->class_id =3D PCI_CLASS_NETWORK_ETHERNET; =20 + rc->phases.hold =3D e1000e_qdev_reset_hold; + dc->desc =3D "Intel 82574L GbE Controller"; - dc->reset =3D e1000e_qdev_reset; dc->vmsd =3D &e1000e_vmstate; =20 e1000e_prop_disable_vnet =3D qdev_prop_uint8; diff --git a/hw/net/trace-events b/hw/net/trace-events index 8fa4299704..c98ad12537 100644 --- a/hw/net/trace-events +++ b/hw/net/trace-events @@ -251,7 +251,7 @@ e1000e_vm_state_stopped(void) "VM state is stopped" # e1000e.c e1000e_cb_pci_realize(void) "E1000E PCI realize entry" e1000e_cb_pci_uninit(void) "E1000E PCI unit entry" -e1000e_cb_qdev_reset(void) "E1000E qdev reset entry" +e1000e_cb_qdev_reset_hold(void) "E1000E qdev reset hold" e1000e_cb_pre_save(void) "E1000E pre save entry" e1000e_cb_post_load(void) "E1000E post load entry" =20 --=20 2.39.0