[{"id":1773979,"web_url":"http://patchwork.ozlabs.org/comment/1773979/","msgid":"<20170923051336.GC4998@umbus.fritz.box>","list_archive_url":null,"date":"2017-09-23T05:13:36","subject":"Re: [Qemu-devel] [PATCH 28/34] hw/net/e1000: use TYPE_PCI_E1000","submitter":{"id":47,"url":"http://patchwork.ozlabs.org/api/people/47/","name":"David Gibson","email":"david@gibson.dropbear.id.au"},"content":"On Fri, Sep 22, 2017 at 01:01:05PM -0300, Philippe Mathieu-Daudé wrote:\n> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>\n\nppc portion\n\nAcked-by: David Gibson <david@gibson.dropbear.id.au>\n\n> ---\n>  include/hw/net/pci.h   | 2 ++\n>  hw/alpha/dp264.c       | 3 ++-\n>  hw/i386/pc.c           | 3 ++-\n>  hw/ppc/ppc440_bamboo.c | 3 ++-\n>  4 files changed, 8 insertions(+), 3 deletions(-)\n> \n> diff --git a/include/hw/net/pci.h b/include/hw/net/pci.h\n> index 529591b7f3..b24b5257a5 100644\n> --- a/include/hw/net/pci.h\n> +++ b/include/hw/net/pci.h\n> @@ -13,6 +13,8 @@\n>  #include \"hw/pci/pci.h\"\n>  #include \"hw/pci/pci_bus.h\"\n>  \n> +#define TYPE_PCI_E1000      \"e1000\"\n> +\n>  PCIDevice *pci_nic_init_nofail(NICInfo *nd, PCIBus *rootbus,\n>                                 const char *default_model,\n>                                 const char *default_devaddr);\n> diff --git a/hw/alpha/dp264.c b/hw/alpha/dp264.c\n> index df6dadf13f..65947fe1bf 100644\n> --- a/hw/alpha/dp264.c\n> +++ b/hw/alpha/dp264.c\n> @@ -21,6 +21,7 @@\n>  #include \"hw/timer/i8254.h\"\n>  #include \"hw/input/i8042.h\"\n>  #include \"hw/char/serial.h\"\n> +#include \"hw/net/pci.h\"\n>  #include \"qemu/cutils.h\"\n>  \n>  #define MAX_IDE_BUS 2\n> @@ -93,7 +94,7 @@ static void clipper_init(MachineState *machine)\n>  \n>      /* Network setup.  e1000 is good enough, failing Tulip support.  */\n>      for (i = 0; i < nb_nics; i++) {\n> -        pci_nic_init_nofail(&nd_table[i], pci_bus, \"e1000\", NULL);\n> +        pci_nic_init_nofail(&nd_table[i], pci_bus, TYPE_PCI_E1000, NULL);\n>      }\n>  \n>      /* IDE disk setup.  */\n> diff --git a/hw/i386/pc.c b/hw/i386/pc.c\n> index 085577e066..3cdeb148aa 100644\n> --- a/hw/i386/pc.c\n> +++ b/hw/i386/pc.c\n> @@ -72,6 +72,7 @@\n>  #include \"hw/nmi.h\"\n>  #include \"hw/i386/intel_iommu.h\"\n>  #include \"hw/net/ne2000-isa.h\"\n> +#include \"hw/net/pci.h\"\n>  \n>  /* debug PC/ISA interrupts */\n>  //#define DEBUG_IRQ\n> @@ -1606,7 +1607,7 @@ void pc_nic_init(ISABus *isa_bus, PCIBus *pci_bus)\n>          if (!pci_bus || (nd->model && strcmp(nd->model, \"ne2k_isa\") == 0)) {\n>              pc_init_ne2k_isa(isa_bus, nd);\n>          } else {\n> -            pci_nic_init_nofail(nd, pci_bus, \"e1000\", NULL);\n> +            pci_nic_init_nofail(nd, pci_bus, TYPE_PCI_E1000, NULL);\n>          }\n>      }\n>      rom_reset_order_override();\n> diff --git a/hw/ppc/ppc440_bamboo.c b/hw/ppc/ppc440_bamboo.c\n> index f92d47f28d..6387dbda9f 100644\n> --- a/hw/ppc/ppc440_bamboo.c\n> +++ b/hw/ppc/ppc440_bamboo.c\n> @@ -24,6 +24,7 @@\n>  #include \"elf.h\"\n>  #include \"exec/address-spaces.h\"\n>  #include \"hw/char/serial.h\"\n> +#include \"hw/net/pci.h\"\n>  #include \"hw/ppc/ppc.h\"\n>  #include \"ppc405.h\"\n>  #include \"sysemu/sysemu.h\"\n> @@ -248,7 +249,7 @@ static void bamboo_init(MachineState *machine)\n>          for (i = 0; i < nb_nics; i++) {\n>              /* There are no PCI NICs on the Bamboo board, but there are\n>               * PCI slots, so we can pick whatever default model we want. */\n> -            pci_nic_init_nofail(&nd_table[i], pcibus, \"e1000\", NULL);\n> +            pci_nic_init_nofail(&nd_table[i], pcibus, TYPE_PCI_E1000, NULL);\n>          }\n>      }\n>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=gibson.dropbear.id.au\n\theader.i=@gibson.dropbear.id.au header.b=\"ZMMGjLQV\"; \n\tdkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xzfCH1fSvz9t67\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 23 Sep 2017 15:33:31 +1000 (AEST)","from localhost ([::1]:33745 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dvd4D-0001KB-4S\n\tfor incoming@patchwork.ozlabs.org; Sat, 23 Sep 2017 01:33:29 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:36133)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <dgibson@ozlabs.org>) id 1dvd0H-0007Jd-UB\n\tfor qemu-devel@nongnu.org; Sat, 23 Sep 2017 01:29:27 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <dgibson@ozlabs.org>) id 1dvd0G-0002Az-O8\n\tfor qemu-devel@nongnu.org; Sat, 23 Sep 2017 01:29:25 -0400","from ozlabs.org ([103.22.144.67]:44275)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <dgibson@ozlabs.org>)\n\tid 1dvd0G-00029v-Cc; Sat, 23 Sep 2017 01:29:24 -0400","by ozlabs.org (Postfix, from userid 1007)\n\tid 3xzf6R6ymqz9t4c; Sat, 23 Sep 2017 15:29:19 +1000 (AEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple;\n\td=gibson.dropbear.id.au; s=201602; t=1506144559;\n\tbh=Mh8m1LLcvyBIVcekD8RtbFEy+onDc43gR4F3VwWuFo4=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=ZMMGjLQVpSW6U69CghsXqvv/d2VhEcCqdOXfSSfvK6zN2WM5fKbtdUWdsGGhJc0Zh\n\tQP6TMzYA269v/ku5JQdUZSrrpGu6a+GxD8kh0X8MEgqsUPZr56hq8d9fyZEuOODx7e\n\tJ6NbjoiHCoWTUfcURYkjTVF3ZfjVxDWUx7rANbcU=","Date":"Sat, 23 Sep 2017 15:13:36 +1000","From":"David Gibson <david@gibson.dropbear.id.au>","To":"Philippe =?iso-8859-1?q?Mathieu-Daud=E9?= <f4bug@amsat.org>","Message-ID":"<20170923051336.GC4998@umbus.fritz.box>","References":"<20170922154014.29350-1-f4bug@amsat.org>\n\t<20170922160111.31885-6-f4bug@amsat.org>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"Efge0/SQAHHP+Pr2\"","Content-Disposition":"inline","In-Reply-To":"<20170922160111.31885-6-f4bug@amsat.org>","User-Agent":"Mutt/1.9.0 (2017-09-02)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"103.22.144.67","Subject":"Re: [Qemu-devel] [PATCH 28/34] hw/net/e1000: use TYPE_PCI_E1000","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://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\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Peter Maydell <peter.maydell@linaro.org>, Thomas Huth <thuth@redhat.com>,\n\t\"Michael S. Tsirkin\" <mst@redhat.com>, qemu-devel@nongnu.org,\n\tJason Wang <jasowang@redhat.com>, Alexander Graf <agraf@suse.de>,\n\tqemu-trivial@nongnu.org, qemu-ppc@nongnu.org,\n\tPaolo Bonzini <pbonzini@redhat.com>, Richard Henderson <rth@twiddle.net>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}}]