{"id":817622,"url":"http://patchwork.ozlabs.org/api/patches/817622/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20170922160111.31885-8-f4bug@amsat.org/","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/projects/14/?format=json","name":"QEMU Development","link_name":"qemu-devel","list_id":"qemu-devel.nongnu.org","list_email":"qemu-devel@nongnu.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20170922160111.31885-8-f4bug@amsat.org>","list_archive_url":null,"date":"2017-09-22T16:01:07","name":"[30/34] hw/net/pcnet: use TYPE_PCI_PCNET","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"2710e9a34abe0e47a37cae7ad20b42c9a8f74397","submitter":{"id":70924,"url":"http://patchwork.ozlabs.org/api/people/70924/?format=json","name":"Philippe Mathieu-Daudé","email":"f4bug@amsat.org"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20170922160111.31885-8-f4bug@amsat.org/mbox/","series":[{"id":4657,"url":"http://patchwork.ozlabs.org/api/series/4657/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=4657","date":"2017-09-22T15:39:40","name":"remove i386/pc dependency from non-PC world (part 1)","version":1,"mbox":"http://patchwork.ozlabs.org/series/4657/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/817622/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/817622/checks/","tags":{},"related":[],"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\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"svNhiCPp\"; 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 3xzJSX1FlDz9s83\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 23 Sep 2017 02:13:48 +1000 (AEST)","from localhost ([::1]:59869 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 1dvQaI-00083a-4v\n\tfor incoming@patchwork.ozlabs.org; Fri, 22 Sep 2017 12:13:46 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:51886)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1dvQP3-0006Sa-UX\n\tfor qemu-devel@nongnu.org; Fri, 22 Sep 2017 12:02:14 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1dvQOz-0000BE-FE\n\tfor qemu-devel@nongnu.org; Fri, 22 Sep 2017 12:02:09 -0400","from mail-qk0-x244.google.com ([2607:f8b0:400d:c09::244]:34824)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1dvQOz-0000Az-BI; Fri, 22 Sep 2017 12:02:05 -0400","by mail-qk0-x244.google.com with SMTP id o77so907005qke.2;\n\tFri, 22 Sep 2017 09:02:05 -0700 (PDT)","from yoga.lan ([181.93.89.178]) by smtp.gmail.com with ESMTPSA id\n\ty31sm108325qta.83.2017.09.22.09.02.00\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 22 Sep 2017 09:02:03 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=sender:from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=tJG+9K3zMw8ol/QDWTtz58a5cs2/dRTxO9ibj7Pmppw=;\n\tb=svNhiCPpAjsN9+V6XyG6rr0jAyZiycQgIvFZc2f2SnVm257CcfKGfmQiHEciAIdMUr\n\tBEr6p9Of5it7d1chtueDu5pKOMTBMnJH71GCQvdM9MofraQLFbr2tNAxHAgwmEwAuVbw\n\t3LbPZeqCDyu+DQCWbCfAJhv2qr+DwOl7K0pB9eM4zA9KZnBuuEl3fEJXyrCBp/HP15dy\n\t4W463F5Nah0vvm7c/M63U3YJSWRZsnYGNAgJR17JhpQMk3LuZUHrLcaNvaFPU5IJxgmZ\n\tqKONe5dWjSXjjFwCEHVpB0vo+zOPPLgYjmxQUTpQD8eg38PA5Aj3hUR0iKS0TnnTphDr\n\tKp/g==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:sender:from:to:cc:subject:date:message-id\n\t:in-reply-to:references:mime-version:content-transfer-encoding;\n\tbh=tJG+9K3zMw8ol/QDWTtz58a5cs2/dRTxO9ibj7Pmppw=;\n\tb=WmKuDcgUXa5pKcEkmkWcAzFBFD8GYsDhEvbVwAILxVYwO7d34TQWAtDr680vMB2yny\n\t6PSCHQ+78RkWGSScFqC3+33INTaBcLpc9rJE8utUT8/+9BsXB9niS67GNLTYYArkgOnL\n\tbwd4LWM5YEbLwwC7NFCY2HtRcaY5jaa+qQOxMJAtQ8cwSFl+eSgJPbwSoipow/2vasYR\n\tRYKpMyxLlOI7bDJwqk0nxXhjQEyqXrrgkBBwPONRzhvcBFCRlkVtqAApj0tep5OTBq7B\n\tMU1VJZyPA2TAI9reUt3ATA8LNGGko9C4i7c1QuRlSD/axsw+v9QP7GeVFpQzSpP2sIJj\n\ttUlw==","X-Gm-Message-State":"AHPjjUjyQ+YaAXfVtwg5ps0h9gKe3UVtNqs/lhsA3gDKccyZ6Yc671cE\n\tsWr/PsCthTwqOHFR+ZKr5xs=","X-Google-Smtp-Source":"AOwi7QD6lMtsgYZgXHodwHl1ZnadhUi3N5l99tIDL7AahsmXSWqBQqZy9Cgu9fzk73Yh5I3HHI/HIA==","X-Received":"by 10.55.45.199 with SMTP id t190mr8790760qkh.230.1506096124647; \n\tFri, 22 Sep 2017 09:02:04 -0700 (PDT)","From":"=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <f4bug@amsat.org>","To":"Peter Maydell <peter.maydell@linaro.org>, Thomas Huth <thuth@redhat.com>,\n\tPaolo Bonzini <pbonzini@redhat.com>,\n\t\"Michael S. Tsirkin\" <mst@redhat.com>, Marcel Apfelbaum\n\t<marcel@redhat.com>, =?utf-8?q?Herv=C3=A9_Poussineau?=\n\t<hpoussin@reactos.org>, \tAurelien Jarno <aurelien@aurel32.net>,\n\tYongbok Kim <yongbok.kim@imgtec.com>, Alexander Graf <agraf@suse.de>, \n\tDavid Gibson <david@gibson.dropbear.id.au>, \n\tJason Wang <jasowang@redhat.com>","Date":"Fri, 22 Sep 2017 13:01:07 -0300","Message-Id":"<20170922160111.31885-8-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":"8bit","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2607:f8b0:400d:c09::244","Subject":"[Qemu-devel] [PATCH 30/34] hw/net/pcnet: use TYPE_PCI_PCNET","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, =?utf-8?q?Philippe_Mathi?=\n\t=?utf-8?b?ZXUtRGF1ZMOp?= <f4bug@amsat.org>, \tqemu-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>"},"content":"Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>\n---\n include/hw/net/pci.h | 1 +\n hw/mips/mips_malta.c | 2 +-\n hw/net/pcnet-pci.c   | 3 +--\n hw/ppc/prep.c        | 3 ++-\n 4 files changed, 5 insertions(+), 4 deletions(-)","diff":"diff --git a/include/hw/net/pci.h b/include/hw/net/pci.h\nindex 92111f86f3..5ad5487a91 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_PCNET      \"pcnet\"\n \n PCIDevice *pci_nic_init_nofail(NICInfo *nd, PCIBus *rootbus,\n                                const char *default_model,\ndiff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c\nindex fb6a2f9363..921678fdb0 100644\n--- a/hw/mips/mips_malta.c\n+++ b/hw/mips/mips_malta.c\n@@ -597,7 +597,7 @@ static void network_init(PCIBus *pci_bus)\n             /* The malta board has a PCNet card using PCI SLOT 11 */\n             default_devaddr = \"0b\";\n \n-        pci_nic_init_nofail(nd, pci_bus, \"pcnet\", default_devaddr);\n+        pci_nic_init_nofail(nd, pci_bus, TYPE_PCI_PCNET, default_devaddr);\n     }\n }\n \ndiff --git a/hw/net/pcnet-pci.c b/hw/net/pcnet-pci.c\nindex 0acf8a4879..878e2c89c1 100644\n--- a/hw/net/pcnet-pci.c\n+++ b/hw/net/pcnet-pci.c\n@@ -29,6 +29,7 @@\n \n #include \"qemu/osdep.h\"\n #include \"hw/pci/pci.h\"\n+#include \"hw/net/pci.h\"\n #include \"net/net.h\"\n #include \"hw/loader.h\"\n #include \"qemu/timer.h\"\n@@ -46,8 +47,6 @@\n //#define PCNET_DEBUG_TMD\n //#define PCNET_DEBUG_MATCH\n \n-#define TYPE_PCI_PCNET \"pcnet\"\n-\n #define PCI_PCNET(obj) \\\n      OBJECT_CHECK(PCIPCNetState, (obj), TYPE_PCI_PCNET)\n \ndiff --git a/hw/ppc/prep.c b/hw/ppc/prep.c\nindex fb330a1769..b2c7a62ebc 100644\n--- a/hw/ppc/prep.c\n+++ b/hw/ppc/prep.c\n@@ -44,6 +44,7 @@\n #include \"hw/input/i8042.h\"\n #include \"hw/isa/pc87312.h\"\n #include \"hw/net/ne2000-isa.h\"\n+#include \"hw/net/pci.h\"\n #include \"sysemu/block-backend.h\"\n #include \"sysemu/arch_init.h\"\n #include \"sysemu/kvm.h\"\n@@ -800,7 +801,7 @@ static void ibm_40p_init(MachineState *machine)\n         pci_vga_init(pci_bus);\n \n         for (i = 0; i < nb_nics; i++) {\n-            pci_nic_init_nofail(&nd_table[i], pci_bus, \"pcnet\",\n+            pci_nic_init_nofail(&nd_table[i], pci_bus, TYPE_PCI_PCNET,\n                                 i == 0 ? \"3\" : NULL);\n         }\n     }\n","prefixes":["30/34"]}