From nobody Tue Feb 10 22:18:25 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1506096831963597.2140505485955; Fri, 22 Sep 2017 09:13:51 -0700 (PDT) Received: from localhost ([::1]:59870 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dvQaA-000893-MD for importer@patchew.org; Fri, 22 Sep 2017 12:13:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51929) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dvQP5-0006Tu-8M for qemu-devel@nongnu.org; Fri, 22 Sep 2017 12:02:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dvQP3-0000Dp-Du for qemu-devel@nongnu.org; Fri, 22 Sep 2017 12:02:11 -0400 Received: from mail-qt0-x242.google.com ([2607:f8b0:400d:c0d::242]:33382) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dvQP3-0000DP-8S; Fri, 22 Sep 2017 12:02:09 -0400 Received: by mail-qt0-x242.google.com with SMTP id b1so930600qtc.0; Fri, 22 Sep 2017 09:02:09 -0700 (PDT) Received: from yoga.lan ([181.93.89.178]) by smtp.gmail.com with ESMTPSA id y31sm108325qta.83.2017.09.22.09.02.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Sep 2017 09:02:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=a6h2NXEXKYQkP/pFrbML8x3vzg+ev/dvgMIczgNPBLg=; b=SXC6poPBdhNIWfw7/aaJXiVBe0EABun0rnOvD9EyY2lWf/CLEfOArQTtDxHEOFGJ3d h12uM0dq/j6E7bBK1TOvRrQBid1htN/AlqF4ouZ6laHTkJGD9al1VFl8KtzcjEBWozpW O6P6bIFNnrjBP4s3Vb7OCdnG+nrpVNIqUCLWIaZH+ApwoXH7WpsLu3M/0tO7nrC/gkLQ uGwZ6UCmh/4f3xdKCfib9kiQ27eyEQ715+UPIOUN0Gw/U26ZkmIrBe1nk7LnM/iKKFav 7YnwpZD1Q5fFf3v6PGRn6wUOxRbNWvF6mdVU7TXX8X7i2mJHsQxqgNHLG5wyDz3rUbdy OS3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=a6h2NXEXKYQkP/pFrbML8x3vzg+ev/dvgMIczgNPBLg=; b=CQOzIgjIiTUNZB4HCSf/ck9AVJfejlFgLQpAI+thFGrHmbC5OjIwwxf+EajAPln9A8 rHAmbzNtfWBqDEcA78Gw5IvVRU/DwLtcP9UIOn/bPCjgSBbAlXEAo5MCuGAvFc/tBkwa HMEUFub9lS5W1y1ah29EB6GogtM4/FuU/8IHndm9TaICAZIVXiZSl8wuweKUxepVAJDF uEO1vBcL2Vqj2IQDXPAOqASoy9vyG2YQTXRIaHu4k5cxyUY1NufRFD1ji66Xc838lKky PhdPeKFiDbBRWCzV8s/rD0g7josoDmH9brr9OwCQn4HzrUUWpMqzbqvoIiAKVeB35ksP QS6Q== X-Gm-Message-State: AHPjjUi7aOocHzur8fDFdZJxHmR3k8LYZ3ZXiEUc6pkZYL7UJyFQDzFq Q3CI5Q3wHZI130VyWVqXFc8= X-Google-Smtp-Source: AOwi7QDwlEabJI6QFXq7PFcMgm5oC4jYl45dtOyhlX4FTHZurprHyoEOUqiBYoUo/QsKtGpK/sjyKQ== X-Received: by 10.200.17.131 with SMTP id d3mr8428365qtj.329.1506096128611; Fri, 22 Sep 2017 09:02:08 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Peter Maydell , Thomas Huth , Paolo Bonzini , "Michael S. Tsirkin" , Marcel Apfelbaum , Aurelien Jarno , Yongbok Kim , Magnus Damm , Jason Wang Date: Fri, 22 Sep 2017 13:01:08 -0300 Message-Id: <20170922160111.31885-9-f4bug@amsat.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170922154014.29350-1-f4bug@amsat.org> References: <20170922154014.29350-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::242 Subject: [Qemu-devel] [PATCH 31/34] hw/net/rtl8139: use TYPE_PCI_RTL8139 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth --- include/hw/net/pci.h | 1 + hw/arm/realview.c | 3 ++- hw/arm/versatilepb.c | 3 ++- hw/mips/mips_fulong2e.c | 3 ++- hw/net/rtl8139.c | 7 +++---- hw/sh4/r2d.c | 5 +++-- 6 files changed, 13 insertions(+), 9 deletions(-) diff --git a/include/hw/net/pci.h b/include/hw/net/pci.h index 5ad5487a91..43ed3b0145 100644 --- a/include/hw/net/pci.h +++ b/include/hw/net/pci.h @@ -16,6 +16,7 @@ #define TYPE_PCI_E1000 "e1000" #define TYPE_PCI_E1000E "e1000e" #define TYPE_PCI_PCNET "pcnet" +#define TYPE_PCI_RTL8139 "rtl8139" =20 PCIDevice *pci_nic_init_nofail(NICInfo *nd, PCIBus *rootbus, const char *default_model, diff --git a/hw/arm/realview.c b/hw/arm/realview.c index 87cd1e583c..35f0da28e4 100644 --- a/hw/arm/realview.c +++ b/hw/arm/realview.c @@ -20,6 +20,7 @@ #include "sysemu/sysemu.h" #include "hw/boards.h" #include "hw/i2c/i2c.h" +#include "hw/net/pci.h" #include "sysemu/block-backend.h" #include "exec/address-spaces.h" #include "qemu/error-report.h" @@ -269,7 +270,7 @@ static void realview_init(MachineState *machine, done_nic =3D 1; } else { if (pci_bus) { - pci_nic_init_nofail(nd, pci_bus, "rtl8139", NULL); + pci_nic_init_nofail(nd, pci_bus, TYPE_PCI_RTL8139, NULL); } } } diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c index 418792cd02..297aad78e1 100644 --- a/hw/arm/versatilepb.c +++ b/hw/arm/versatilepb.c @@ -18,6 +18,7 @@ #include "sysemu/sysemu.h" #include "hw/pci/pci.h" #include "hw/i2c/i2c.h" +#include "hw/net/pci.h" #include "hw/boards.h" #include "sysemu/block-backend.h" #include "exec/address-spaces.h" @@ -271,7 +272,7 @@ static void versatile_init(MachineState *machine, int b= oard_id) smc91c111_init(nd, 0x10010000, sic[25]); done_smc =3D 1; } else { - pci_nic_init_nofail(nd, pci_bus, "rtl8139", NULL); + pci_nic_init_nofail(nd, pci_bus, TYPE_PCI_RTL8139, NULL); } } if (machine_usb(machine)) { diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c index 7ebbffa8f2..fe618953c9 100644 --- a/hw/mips/mips_fulong2e.c +++ b/hw/mips/mips_fulong2e.c @@ -44,6 +44,7 @@ #include "hw/timer/mc146818rtc.h" #include "hw/timer/i8254.h" #include "hw/input/i8042.h" +#include "hw/net/pci.h" #include "sysemu/blockdev.h" #include "exec/address-spaces.h" #include "sysemu/qtest.h" @@ -253,7 +254,7 @@ static void network_init (PCIBus *pci_bus) default_devaddr =3D "07"; } =20 - pci_nic_init_nofail(nd, pci_bus, "rtl8139", default_devaddr); + pci_nic_init_nofail(nd, pci_bus, TYPE_PCI_RTL8139, default_devaddr= ); } } =20 diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c index 3be24bbee7..0f952eceba 100644 --- a/hw/net/rtl8139.c +++ b/hw/net/rtl8139.c @@ -59,6 +59,7 @@ #include "net/net.h" #include "net/eth.h" #include "hw/loader.h" +#include "hw/net/pci.h" #include "sysemu/sysemu.h" #include "qemu/iov.h" =20 @@ -90,10 +91,8 @@ static inline GCC_FMT_ATTR(1, 2) int DPRINTF(const char = *fmt, ...) } #endif =20 -#define TYPE_RTL8139 "rtl8139" - #define RTL8139(obj) \ - OBJECT_CHECK(RTL8139State, (obj), TYPE_RTL8139) + OBJECT_CHECK(RTL8139State, (obj), TYPE_PCI_RTL8139) =20 /* Symbolic offsets to registers. */ enum RTL8139_registers { @@ -3437,7 +3436,7 @@ static void rtl8139_class_init(ObjectClass *klass, vo= id *data) } =20 static const TypeInfo rtl8139_info =3D { - .name =3D TYPE_RTL8139, + .name =3D TYPE_PCI_RTL8139, .parent =3D TYPE_PCI_DEVICE, .instance_size =3D sizeof(RTL8139State), .class_init =3D rtl8139_class_init, diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c index 16b9ed2db2..dde60b2bc2 100644 --- a/hw/sh4/r2d.c +++ b/hw/sh4/r2d.c @@ -39,6 +39,7 @@ #include "hw/ide.h" #include "hw/loader.h" #include "hw/usb.h" +#include "hw/net/pci.h" #include "hw/block/flash.h" #include "sysemu/block-backend.h" #include "exec/address-spaces.h" @@ -303,8 +304,8 @@ static void r2d_init(MachineState *machine) =20 /* NIC: rtl8139 on-board, and 2 slots. */ for (i =3D 0; i < nb_nics; i++) - pci_nic_init_nofail(&nd_table[i], pci_bus, - "rtl8139", i=3D=3D0 ? "2" : NULL); + pci_nic_init_nofail(&nd_table[i], pci_bus, TYPE_PCI_RTL8139, + i =3D=3D 0 ? "2" : NULL); =20 /* USB keyboard */ usb_create_simple(usb_bus_find(-1), "usb-kbd"); --=20 2.14.1