[{"id":1773859,"web_url":"http://patchwork.ozlabs.org/comment/1773859/","msgid":"<812ae714-83b4-909e-544a-03844a33ddab@reactos.org>","list_archive_url":null,"date":"2017-09-22T20:14:16","subject":"Re: [Qemu-devel] [PATCH 32/34] hw/net/ne2000: use TYPE_PCI_NE2000","submitter":{"id":2909,"url":"http://patchwork.ozlabs.org/api/people/2909/","name":"Hervé Poussineau","email":"hpoussin@reactos.org"},"content":"Le 22/09/2017 à 18:01, Philippe Mathieu-Daudé a écrit :\n> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>\n> ---\n>   include/hw/net/pci.h  | 1 +\n>   hw/net/ne2000.c       | 3 ++-\n>   hw/ppc/mac_newworld.c | 3 ++-\n>   hw/ppc/mac_oldworld.c | 3 ++-\n>   hw/ppc/prep.c         | 2 +-\n>   hw/sparc64/sun4u.c    | 3 ++-\n>   6 files changed, 10 insertions(+), 5 deletions(-)\n\nReviewed-by: Hervé Poussineau <hpoussin@reactos.org>","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=reactos.org header.i=@reactos.org\n\theader.b=\"X3Mb/iHv\"; dkim-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 3xzPtd625xz9s82\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 23 Sep 2017 06:18:17 +1000 (AEST)","from localhost ([::1]:60879 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 1dvUOt-0001NY-Ts\n\tfor incoming@patchwork.ozlabs.org; Fri, 22 Sep 2017 16:18:15 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:34087)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <hpoussin@reactos.org>) id 1dvULB-0006u5-Al\n\tfor qemu-devel@nongnu.org; Fri, 22 Sep 2017 16:14:30 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <hpoussin@reactos.org>) id 1dvULA-0006Tj-DM\n\tfor qemu-devel@nongnu.org; Fri, 22 Sep 2017 16:14:25 -0400","from iserv.reactos.org ([2a01:4f8:221:4c5::3]:47280)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <hpoussin@reactos.org>)\n\tid 1dvUL6-0006Rv-LX; Fri, 22 Sep 2017 16:14:20 -0400","from rob92-5-82-227-227-196.fbx.proxad.net ([82.227.227.196]\n\thelo=[192.168.0.35]) by iserv.reactos.org with esmtpsa\n\t(TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2)\n\t(envelope-from <hpoussin@reactos.org>)\n\tid 1dvUL5-0005h6-2c; Fri, 22 Sep 2017 20:14:19 +0000"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=reactos.org; s=25047; \n\th=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject;\n\tbh=dMfaSw14t4+MRQupmEUZjff355c+jw/6L7nPd7XhZOg=; \n\tb=X3Mb/iHvDsefpywTo9RULqVhSw8ur5qPSJCcfG8TWIEtJSM4n3I6Rf6tXhh30hyzMa3g3Upm3uMhQN6E6EWdcGV20WFjRb8rWEsBFBFH8jWcOKnNTICmLE7AKdO07JGNm3Yn6t22BpS452vqYFw+S6QKw2K0Ix9CO/gCGgcuW/4=;","To":"=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <f4bug@amsat.org>,\n\tPeter Maydell <peter.maydell@linaro.org>,\n\tThomas Huth <thuth@redhat.com>, \tPaolo Bonzini <pbonzini@redhat.com>,\n\t\"Michael S. Tsirkin\" <mst@redhat.com>, \n\tMarcel Apfelbaum <marcel@redhat.com>, Aurelien Jarno\n\t<aurelien@aurel32.net>, Alexander Graf <agraf@suse.de>, David Gibson\n\t<david@gibson.dropbear.id.au>, \tJason Wang <jasowang@redhat.com>,\n\tMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, \n\tArtyom Tarasenko <atar4qemu@gmail.com>","References":"<20170922154014.29350-1-f4bug@amsat.org>\n\t<20170922160111.31885-10-f4bug@amsat.org>","From":"=?utf-8?q?Herv=C3=A9_Poussineau?= <hpoussin@reactos.org>","Message-ID":"<812ae714-83b4-909e-544a-03844a33ddab@reactos.org>","Date":"Fri, 22 Sep 2017 22:14:16 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<20170922160111.31885-10-f4bug@amsat.org>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Language":"en-US","Content-Transfer-Encoding":"8bit","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]","X-Received-From":"2a01:4f8:221:4c5::3","Subject":"Re: [Qemu-devel] [PATCH 32/34] hw/net/ne2000: use TYPE_PCI_NE2000","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":"qemu-trivial@nongnu.org, qemu-ppc@nongnu.org, qemu-devel@nongnu.org","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>"}},{"id":1773978,"web_url":"http://patchwork.ozlabs.org/comment/1773978/","msgid":"<20170923051439.GE4998@umbus.fritz.box>","list_archive_url":null,"date":"2017-09-23T05:14:39","subject":"Re: [Qemu-devel] [PATCH 32/34] hw/net/ne2000: use TYPE_PCI_NE2000","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:09PM -0300, Philippe Mathieu-Daudé wrote:\n> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>\n\nppc portions\n\nAcked-by: David Gibson <david@gibson.dropbear.id.au>\n\n> ---\n>  include/hw/net/pci.h  | 1 +\n>  hw/net/ne2000.c       | 3 ++-\n>  hw/ppc/mac_newworld.c | 3 ++-\n>  hw/ppc/mac_oldworld.c | 3 ++-\n>  hw/ppc/prep.c         | 2 +-\n>  hw/sparc64/sun4u.c    | 3 ++-\n>  6 files changed, 10 insertions(+), 5 deletions(-)\n> \n> diff --git a/include/hw/net/pci.h b/include/hw/net/pci.h\n> index 43ed3b0145..da733dd1d9 100644\n> --- a/include/hw/net/pci.h\n> +++ b/include/hw/net/pci.h\n> @@ -15,6 +15,7 @@\n>  \n>  #define TYPE_PCI_E1000      \"e1000\"\n>  #define TYPE_PCI_E1000E     \"e1000e\"\n> +#define TYPE_PCI_NE2000     \"ne2k_pci\"\n>  #define TYPE_PCI_PCNET      \"pcnet\"\n>  #define TYPE_PCI_RTL8139    \"rtl8139\"\n>  \n> diff --git a/hw/net/ne2000.c b/hw/net/ne2000.c\n> index 29bd4adb3f..b0a664d302 100644\n> --- a/hw/net/ne2000.c\n> +++ b/hw/net/ne2000.c\n> @@ -23,6 +23,7 @@\n>   */\n>  #include \"qemu/osdep.h\"\n>  #include \"hw/pci/pci.h\"\n> +#include \"hw/net/pci.h\"\n>  #include \"ne2000.h\"\n>  #include \"hw/loader.h\"\n>  #include \"sysemu/sysemu.h\"\n> @@ -779,7 +780,7 @@ static void ne2000_class_init(ObjectClass *klass, void *data)\n>  }\n>  \n>  static const TypeInfo ne2000_info = {\n> -    .name          = \"ne2k_pci\",\n> +    .name          = TYPE_PCI_NE2000,\n>      .parent        = TYPE_PCI_DEVICE,\n>      .instance_size = sizeof(PCINE2000State),\n>      .class_init    = ne2000_class_init,\n> diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c\n> index 33b46cb50b..2afc35c27f 100644\n> --- a/hw/ppc/mac_newworld.c\n> +++ b/hw/ppc/mac_newworld.c\n> @@ -55,6 +55,7 @@\n>  #include \"hw/ppc/mac_dbdma.h\"\n>  #include \"hw/timer/m48t59.h\"\n>  #include \"hw/pci/pci.h\"\n> +#include \"hw/net/pci.h\"\n>  #include \"net/net.h\"\n>  #include \"sysemu/sysemu.h\"\n>  #include \"hw/boards.h\"\n> @@ -435,7 +436,7 @@ static void ppc_core99_init(MachineState *machine)\n>      }\n>  \n>      for (i = 0; i < nb_nics; i++) {\n> -        pci_nic_init_nofail(&nd_table[i], pci_bus, \"ne2k_pci\", NULL);\n> +        pci_nic_init_nofail(&nd_table[i], pci_bus, TYPE_PCI_NE2000, NULL);\n>      }\n>  \n>      /* The NewWorld NVRAM is not located in the MacIO device */\n> diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c\n> index 193b9047d9..8096e5a126 100644\n> --- a/hw/ppc/mac_oldworld.c\n> +++ b/hw/ppc/mac_oldworld.c\n> @@ -34,6 +34,7 @@\n>  #include \"net/net.h\"\n>  #include \"hw/isa/isa.h\"\n>  #include \"hw/pci/pci.h\"\n> +#include \"hw/net/pci.h\"\n>  #include \"hw/boards.h\"\n>  #include \"hw/nvram/fw_cfg.h\"\n>  #include \"hw/char/escc.h\"\n> @@ -278,7 +279,7 @@ static void ppc_heathrow_init(MachineState *machine)\n>                               escc_mem, 0, memory_region_size(escc_mem));\n>  \n>      for(i = 0; i < nb_nics; i++)\n> -        pci_nic_init_nofail(&nd_table[i], pci_bus, \"ne2k_pci\", NULL);\n> +        pci_nic_init_nofail(&nd_table[i], pci_bus, TYPE_PCI_NE2000, NULL);\n>  \n>  \n>      ide_drive_get(hd, ARRAY_SIZE(hd));\n> diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c\n> index b2c7a62ebc..103beafef3 100644\n> --- a/hw/ppc/prep.c\n> +++ b/hw/ppc/prep.c\n> @@ -636,7 +636,7 @@ static void ppc_prep_init(MachineState *machine)\n>              isa_ne2000_init(isa_bus, ne2000_io[i], ne2000_irq[i],\n>                              &nd_table[i]);\n>          } else {\n> -            pci_nic_init_nofail(&nd_table[i], pci_bus, \"ne2k_pci\", NULL);\n> +            pci_nic_init_nofail(&nd_table[i], pci_bus, TYPE_PCI_NE2000, NULL);\n>          }\n>      }\n>  \n> diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c\n> index fd10741607..67879c5135 100644\n> --- a/hw/sparc64/sun4u.c\n> +++ b/hw/sparc64/sun4u.c\n> @@ -32,6 +32,7 @@\n>  #include \"hw/char/serial.h\"\n>  #include \"hw/timer/m48t59.h\"\n>  #include \"hw/input/i8042.h\"\n> +#include \"hw/net/pci.h\"\n>  #include \"hw/block/fdc.h\"\n>  #include \"net/net.h\"\n>  #include \"qemu/timer.h\"\n> @@ -476,7 +477,7 @@ static void sun4uv_init(MemoryRegion *address_space_mem,\n>  \n>              onboard_nic_idx = i;\n>          } else {\n> -            pci_nic_init_nofail(nd, pci_bus, \"ne2k_pci\", NULL);\n> +            pci_nic_init_nofail(nd, pci_bus, TYPE_PCI_NE2000, NULL);\n>          }\n>      }\n>      onboard_nic_idx = MAX(onboard_nic_idx, 0);","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=\"aM/GtyFI\"; \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 3xzfBD3l5Hz9t67\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 23 Sep 2017 15:32:32 +1000 (AEST)","from localhost ([::1]:33744 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 1dvd3E-0000Zb-Iw\n\tfor incoming@patchwork.ozlabs.org; Sat, 23 Sep 2017 01:32:28 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:36263)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <dgibson@ozlabs.org>) id 1dvd0M-0007Nj-M2\n\tfor qemu-devel@nongnu.org; Sat, 23 Sep 2017 01:29:34 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <dgibson@ozlabs.org>) id 1dvd0L-0002DX-0l\n\tfor qemu-devel@nongnu.org; Sat, 23 Sep 2017 01:29:30 -0400","from ozlabs.org ([103.22.144.67]:34539)\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 1dvd0K-0002A1-7y; Sat, 23 Sep 2017 01:29:28 -0400","by ozlabs.org (Postfix, from userid 1007)\n\tid 3xzf6S1Cy2z9t42; 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=1506144560;\n\tbh=lD7b9XbWM2PZ9SFsg0uxzn91Cz0bUZn4je2vN+xUeg8=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=aM/GtyFIcXwetzQC56jrBLY5uLWLSSMWXczwctRgI1JSK0Ft8qsfOiPKBMCXHiIiO\n\thKsNAtXWPxoIoNCU4azqbcaKcui3Ref3z9DvO4EaF30LmG14OlpCapnEZwdSgLNZD4\n\tOxVGIj1uV1stzQyTIQModQOO9c830UziFnzwJZ5M=","Date":"Sat, 23 Sep 2017 15:14:39 +1000","From":"David Gibson <david@gibson.dropbear.id.au>","To":"Philippe =?iso-8859-1?q?Mathieu-Daud=E9?= <f4bug@amsat.org>","Message-ID":"<20170923051439.GE4998@umbus.fritz.box>","References":"<20170922154014.29350-1-f4bug@amsat.org>\n\t<20170922160111.31885-10-f4bug@amsat.org>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"eQ8QKBgzzGzhafWG\"","Content-Disposition":"inline","In-Reply-To":"<20170922160111.31885-10-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 32/34] hw/net/ne2000: use TYPE_PCI_NE2000","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-ppc@nongnu.org, Jason Wang\n\t<jasowang@redhat.com>, \n\tMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Alexander Graf\n\t<agraf@suse.de>, qemu-devel@nongnu.org, \tqemu-trivial@nongnu.org,\n\t=?iso-8859-1?q?Herv=E9?= Poussineau <hpoussin@reactos.org>,\n\tArtyom Tarasenko <atar4qemu@gmail.com>, Marcel Apfelbaum\n\t<marcel@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Aurelien Jarno\n\t<aurelien@aurel32.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>"}}]