From nobody Tue Nov 26 22:35:08 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1704747105; cv=none; d=zohomail.com; s=zohoarc; b=Y/X/ndLBY6SRHZjtzknYNYNGOnuCLS/mds/f1Lyg7SJRiNm2VKQOa/astsjlDyyCB3zAU0It0QvxVAQ436qZidzehmdT0Az5BGqoYO5uODGnTDhXilGwoyZunrGOie0d5038au04H014JhTUdCGPr3gncN7xpG2KgIUeZpxWUlA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704747105; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=3IJgWxMmUdLOBVuYUZ4BO4uyS9hEOvqvAglyEu5N/aM=; b=a08+SLJAdl4U6VHkJ14rc2Rfm5gjPquALMf1Bmrp1d0o6AIap6v0m5GHYWodd4nzGY+Kk3JiOS+mR6Fz3GsV1VKAtT3mYNy/HY/WJMe7wt41pzRB6KYXjFzVyQtv0ZU9HS/RX44odU1AYiIEGDqXIHjKnlM3fXNGIRQN3wjL+Ss= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1704747105111965.8149958306232; Mon, 8 Jan 2024 12:51:45 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.663910.1033939 (Exim 4.92) (envelope-from ) id 1rMwaX-0003bi-75; Mon, 08 Jan 2024 20:51:13 +0000 Received: by outflank-mailman (output) from mailman id 663910.1033939; Mon, 08 Jan 2024 20:51:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rMwaW-0003Wl-5q; Mon, 08 Jan 2024 20:51:12 +0000 Received: by outflank-mailman (input) for mailman id 663910; Mon, 08 Jan 2024 20:51:08 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rMwaR-0000R5-Rq for xen-devel@lists.xenproject.org; Mon, 08 Jan 2024 20:51:07 +0000 Received: from casper.infradead.org (casper.infradead.org [2001:8b0:10b:1236::1]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id a2a7eecd-ae67-11ee-98ef-6d05b1d4d9a1; Mon, 08 Jan 2024 21:51:03 +0100 (CET) Received: from [2001:8b0:10b:1::ebe] (helo=i7.infradead.org) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1rMwYl-008RQ9-31; Mon, 08 Jan 2024 20:49:24 +0000 Received: from dwoodhou by i7.infradead.org with local (Exim 4.96.2 #2 (Red Hat Linux)) id 1rMwYl-002NH5-2H; Mon, 08 Jan 2024 20:49:23 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list X-Inumbo-ID: a2a7eecd-ae67-11ee-98ef-6d05b1d4d9a1 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=3IJgWxMmUdLOBVuYUZ4BO4uyS9hEOvqvAglyEu5N/aM=; b=ZlBVon3DzGBlJcC87Be0qL8RWU d6X4a+DxoBXqP/XC56vV646U0bCd4hdkyLAnU1gOfJvP0C/ZzRNMTkfwfzzf4mext7K0imLIVhvNI 7coUYjY/T7UNIgIG85T/i9YMGkx8TR8sSvrDQh1F/vqzMXuY8Xw2sKB9xvUSr0rc2ofICePdTnDEu 0o8fcUcIZB673qW57YhOeq/H8AT6j/TStiqxRQbHJKVAi0Q+dhqTf2bJMMW1B0HL8/8R3WbDQ5Xrx s5c7fcKmoTWB7pLR8xIRwnY+fyucp+GpIQICz922h/DyZTkH4cmVM6ML/C32nC8Zq5X6oEkYPxodk TwHGOZig==; From: David Woodhouse To: qemu-devel@nongnu.org Cc: Richard Henderson , Beniamino Galvani , Peter Maydell , Strahinja Jankovic , Niek Linnenbank , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Andrew Jeffery , Joel Stanley , Igor Mitsyanko , Jean-Christophe Dubois , Andrey Smirnov , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Rob Herring , Subbaraya Sundeep , Jan Kiszka , Tyrone Ting , Hao Wu , Radoslaw Biernacki , Leif Lindholm , Marcin Juszkiewicz , "Edgar E. Iglesias" , Alistair Francis , Helge Deller , Paolo Bonzini , Eduardo Habkost , "Michael S. Tsirkin" , Marcel Apfelbaum , Song Gao , Thomas Huth , Laurent Vivier , Huacai Chen , Jiaxun Yang , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aleksandar Rikalo , Aurelien Jarno , Jason Wang , Jia Liu , Stafford Horne , Mark Cave-Ayland , Nicholas Piggin , Daniel Henrique Barboza , David Gibson , Harsh Prateek Bora , Bin Meng , Palmer Dabbelt , Weiwei Li , Liu Zhiwei , Halil Pasic , Christian Borntraeger , Eric Farman , David Hildenbrand , Ilya Leoshkevich , Yoshinori Sato , Magnus Damm , Artyom Tarasenko , Stefano Stabellini , Anthony Perard , Paul Durrant , Max Filippov , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, xen-devel@lists.xenproject.org, David Woodhouse Subject: [PATCH v3 42/46] hw/xtensa/xtfpga: use qemu_create_nic_device() Date: Mon, 8 Jan 2024 20:27:11 +0000 Message-ID: <20240108204909.564514-43-dwmw2@infradead.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240108204909.564514-1-dwmw2@infradead.org> References: <20240108204909.564514-1-dwmw2@infradead.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: David Woodhouse X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html X-ZohoMail-DKIM: pass (identity @infradead.org) X-ZM-MESSAGEID: 1704747105788100007 Content-Type: text/plain; charset="utf-8" From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Thomas Huth --- hw/xtensa/xtfpga.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c index fbad1c83a3..f49e6591dc 100644 --- a/hw/xtensa/xtfpga.c +++ b/hw/xtensa/xtfpga.c @@ -141,14 +141,16 @@ static void xtfpga_net_init(MemoryRegion *address_spa= ce, hwaddr base, hwaddr descriptors, hwaddr buffers, - qemu_irq irq, NICInfo *nd) + qemu_irq irq) { DeviceState *dev; SysBusDevice *s; MemoryRegion *ram; =20 - dev =3D qdev_new("open_eth"); - qdev_set_nic_properties(dev, nd); + dev =3D qemu_create_nic_device("open_eth", true, NULL); + if (!dev) { + return; + } =20 s =3D SYS_BUS_DEVICE(dev); sysbus_realize_and_unref(s, &error_fatal); @@ -301,10 +303,7 @@ static void xtfpga_init(const XtfpgaBoardDesc *board, = MachineState *machine) memory_region_add_subregion(system_memory, board->io[1], io); } xtfpga_fpga_init(system_io, 0x0d020000, freq); - if (nd_table[0].used) { - xtfpga_net_init(system_io, 0x0d030000, 0x0d030400, 0x0d800000, - extints[1], nd_table); - } + xtfpga_net_init(system_io, 0x0d030000, 0x0d030400, 0x0d800000, extints= [1]); =20 serial_mm_init(system_io, 0x0d050020, 2, extints[0], 115200, serial_hd(0), DEVICE_NATIVE_ENDIAN); --=20 2.41.0