qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v3 25/46] hw/net/smc91c111: use qemu_configure_nic_device()


From: Thomas Huth
Subject: Re: [PATCH v3 25/46] hw/net/smc91c111: use qemu_configure_nic_device()
Date: Fri, 26 Jan 2024 16:14:11 +0100
User-agent: Mozilla Thunderbird

On 08/01/2024 21.26, David Woodhouse wrote:
From: David Woodhouse <dwmw@amazon.co.uk>

Some callers instantiate the device unconditionally, others will do so only
if there is a NICInfo to go with it. This appears to be fairly random, but
preserve the existing behaviour for now.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
---
...
diff --git a/hw/net/smc91c111.c b/hw/net/smc91c111.c
index 49b7c26102..702d0e8e83 100644
--- a/hw/net/smc91c111.c
+++ b/hw/net/smc91c111.c
@@ -818,14 +818,13 @@ static void smc91c111_register_types(void)
/* Legacy helper function. Should go away when machine config files are
     implemented.  */
-void smc91c111_init(NICInfo *nd, uint32_t base, qemu_irq irq)
+void smc91c111_init(uint32_t base, qemu_irq irq)
  {
      DeviceState *dev;
      SysBusDevice *s;
- qemu_check_nic_model(nd, "smc91c111");
      dev = qdev_new(TYPE_SMC91C111);
-    qdev_set_nic_properties(dev, nd);
+    qemu_configure_nic_device(dev, true, NULL);

Wouldn't it be possible to use qemu_create_nic_device() here, too?

Anyway:
Reviewed-by: Thomas Huth <thuth@redhat.com>


      s = SYS_BUS_DEVICE(dev);
      sysbus_realize_and_unref(s, &error_fatal);
      sysbus_mmio_map(s, 0, base);




reply via email to

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