qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-trivial] [PATCH 32/34] hw/net/ne2000: use TYPE_PCI_NE2000


From: David Gibson
Subject: Re: [Qemu-trivial] [PATCH 32/34] hw/net/ne2000: use TYPE_PCI_NE2000
Date: Sat, 23 Sep 2017 15:14:39 +1000
User-agent: Mutt/1.9.0 (2017-09-02)

On Fri, Sep 22, 2017 at 01:01:09PM -0300, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>

ppc portions

Acked-by: David Gibson <address@hidden>

> ---
>  include/hw/net/pci.h  | 1 +
>  hw/net/ne2000.c       | 3 ++-
>  hw/ppc/mac_newworld.c | 3 ++-
>  hw/ppc/mac_oldworld.c | 3 ++-
>  hw/ppc/prep.c         | 2 +-
>  hw/sparc64/sun4u.c    | 3 ++-
>  6 files changed, 10 insertions(+), 5 deletions(-)
> 
> diff --git a/include/hw/net/pci.h b/include/hw/net/pci.h
> index 43ed3b0145..da733dd1d9 100644
> --- a/include/hw/net/pci.h
> +++ b/include/hw/net/pci.h
> @@ -15,6 +15,7 @@
>  
>  #define TYPE_PCI_E1000      "e1000"
>  #define TYPE_PCI_E1000E     "e1000e"
> +#define TYPE_PCI_NE2000     "ne2k_pci"
>  #define TYPE_PCI_PCNET      "pcnet"
>  #define TYPE_PCI_RTL8139    "rtl8139"
>  
> diff --git a/hw/net/ne2000.c b/hw/net/ne2000.c
> index 29bd4adb3f..b0a664d302 100644
> --- a/hw/net/ne2000.c
> +++ b/hw/net/ne2000.c
> @@ -23,6 +23,7 @@
>   */
>  #include "qemu/osdep.h"
>  #include "hw/pci/pci.h"
> +#include "hw/net/pci.h"
>  #include "ne2000.h"
>  #include "hw/loader.h"
>  #include "sysemu/sysemu.h"
> @@ -779,7 +780,7 @@ static void ne2000_class_init(ObjectClass *klass, void 
> *data)
>  }
>  
>  static const TypeInfo ne2000_info = {
> -    .name          = "ne2k_pci",
> +    .name          = TYPE_PCI_NE2000,
>      .parent        = TYPE_PCI_DEVICE,
>      .instance_size = sizeof(PCINE2000State),
>      .class_init    = ne2000_class_init,
> diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c
> index 33b46cb50b..2afc35c27f 100644
> --- a/hw/ppc/mac_newworld.c
> +++ b/hw/ppc/mac_newworld.c
> @@ -55,6 +55,7 @@
>  #include "hw/ppc/mac_dbdma.h"
>  #include "hw/timer/m48t59.h"
>  #include "hw/pci/pci.h"
> +#include "hw/net/pci.h"
>  #include "net/net.h"
>  #include "sysemu/sysemu.h"
>  #include "hw/boards.h"
> @@ -435,7 +436,7 @@ static void ppc_core99_init(MachineState *machine)
>      }
>  
>      for (i = 0; i < nb_nics; i++) {
> -        pci_nic_init_nofail(&nd_table[i], pci_bus, "ne2k_pci", NULL);
> +        pci_nic_init_nofail(&nd_table[i], pci_bus, TYPE_PCI_NE2000, NULL);
>      }
>  
>      /* The NewWorld NVRAM is not located in the MacIO device */
> diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c
> index 193b9047d9..8096e5a126 100644
> --- a/hw/ppc/mac_oldworld.c
> +++ b/hw/ppc/mac_oldworld.c
> @@ -34,6 +34,7 @@
>  #include "net/net.h"
>  #include "hw/isa/isa.h"
>  #include "hw/pci/pci.h"
> +#include "hw/net/pci.h"
>  #include "hw/boards.h"
>  #include "hw/nvram/fw_cfg.h"
>  #include "hw/char/escc.h"
> @@ -278,7 +279,7 @@ static void ppc_heathrow_init(MachineState *machine)
>                               escc_mem, 0, memory_region_size(escc_mem));
>  
>      for(i = 0; i < nb_nics; i++)
> -        pci_nic_init_nofail(&nd_table[i], pci_bus, "ne2k_pci", NULL);
> +        pci_nic_init_nofail(&nd_table[i], pci_bus, TYPE_PCI_NE2000, NULL);
>  
>  
>      ide_drive_get(hd, ARRAY_SIZE(hd));
> diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c
> index b2c7a62ebc..103beafef3 100644
> --- a/hw/ppc/prep.c
> +++ b/hw/ppc/prep.c
> @@ -636,7 +636,7 @@ static void ppc_prep_init(MachineState *machine)
>              isa_ne2000_init(isa_bus, ne2000_io[i], ne2000_irq[i],
>                              &nd_table[i]);
>          } else {
> -            pci_nic_init_nofail(&nd_table[i], pci_bus, "ne2k_pci", NULL);
> +            pci_nic_init_nofail(&nd_table[i], pci_bus, TYPE_PCI_NE2000, 
> NULL);
>          }
>      }
>  
> diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
> index fd10741607..67879c5135 100644
> --- a/hw/sparc64/sun4u.c
> +++ b/hw/sparc64/sun4u.c
> @@ -32,6 +32,7 @@
>  #include "hw/char/serial.h"
>  #include "hw/timer/m48t59.h"
>  #include "hw/input/i8042.h"
> +#include "hw/net/pci.h"
>  #include "hw/block/fdc.h"
>  #include "net/net.h"
>  #include "qemu/timer.h"
> @@ -476,7 +477,7 @@ static void sun4uv_init(MemoryRegion *address_space_mem,
>  
>              onboard_nic_idx = i;
>          } else {
> -            pci_nic_init_nofail(nd, pci_bus, "ne2k_pci", NULL);
> +            pci_nic_init_nofail(nd, pci_bus, TYPE_PCI_NE2000, NULL);
>          }
>      }
>      onboard_nic_idx = MAX(onboard_nic_idx, 0);

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]