qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Philippe Mathieu-Daudé" <philmd@linaro.org>,
	qemu-arm@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>,
	"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
	"Aleksandar Rikalo" <arikalo@gmail.com>,
	"Harsh Prateek Bora" <harshpb@linux.ibm.com>,
	qemu-ppc@nongnu.org, "Laurent Vivier" <laurent@vivier.eu>,
	"Hervé Poussineau" <hpoussin@reactos.org>,
	"Artyom Tarasenko" <atar4qemu@gmail.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Thomas Huth" <huth@tuxfamily.org>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Fam Zheng" <fam@euphon.net>, "Helge Deller" <deller@gmx.de>,
	"Daniel Henrique Barboza" <danielhb413@gmail.com>,
	"Nicholas Piggin" <npiggin@gmail.com>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>
Subject: [PATCH 3/3] hw/scsi/esp: Call scsi_bus_legacy_handle_cmdline() once
Date: Fri, 22 Nov 2024 12:19:39 +0100	[thread overview]
Message-ID: <20241122111939.11936-4-philmd@linaro.org> (raw)
In-Reply-To: <20241122111939.11936-1-philmd@linaro.org>

Call scsi_bus_legacy_handle_cmdline() once in the DeviceRealize
handler, just after scsi_bus_init().

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/m68k/next-cube.c | 2 --
 hw/m68k/q800.c      | 2 --
 hw/mips/jazz.c      | 2 --
 hw/scsi/esp.c       | 1 +
 hw/sparc/sun4m.c    | 1 -
 5 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/hw/m68k/next-cube.c b/hw/m68k/next-cube.c
index 08886d432c..f0fdbef7ae 100644
--- a/hw/m68k/next-cube.c
+++ b/hw/m68k/next-cube.c
@@ -851,8 +851,6 @@ static void next_scsi_init(DeviceState *pcdev)
 
     next_pc->scsi_reset = qdev_get_gpio_in(dev, 0);
     next_pc->scsi_dma = qdev_get_gpio_in(dev, 1);
-
-    scsi_bus_legacy_handle_cmdline(&esp->bus);
 }
 
 static void next_escc_init(DeviceState *pcdev)
diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c
index 556604e1dc..816a662fd9 100644
--- a/hw/m68k/q800.c
+++ b/hw/m68k/q800.c
@@ -487,8 +487,6 @@ static void q800_machine_init(MachineState *machine)
     memory_region_add_subregion(&m->macio, ESP_PDMA - IO_BASE,
                                 sysbus_mmio_get_region(sysbus, 1));
 
-    scsi_bus_legacy_handle_cmdline(&esp->bus);
-
     /* Apple Sound Chip */
 
     object_initialize_child(OBJECT(machine), "asc", &m->asc, TYPE_ASC);
diff --git a/hw/mips/jazz.c b/hw/mips/jazz.c
index 0e43c9f0ba..71badb0616 100644
--- a/hw/mips/jazz.c
+++ b/hw/mips/jazz.c
@@ -347,8 +347,6 @@ static void mips_jazz_init(MachineState *machine,
     sysbus_connect_irq(sysbus, 0, qdev_get_gpio_in(rc4030, 5));
     sysbus_mmio_map(sysbus, 0, 0x80002000);
 
-    scsi_bus_legacy_handle_cmdline(&esp->bus);
-
     /* Floppy */
     for (n = 0; n < MAX_FD; n++) {
         fds[n] = drive_get(IF_FLOPPY, 0, n);
diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c
index ac841dc32e..a1d2f6f380 100644
--- a/hw/scsi/esp.c
+++ b/hw/scsi/esp.c
@@ -1542,6 +1542,7 @@ static void sysbus_esp_realize(DeviceState *dev, Error **errp)
     qdev_init_gpio_in(dev, sysbus_esp_gpio_demux, 2);
 
     scsi_bus_init(&s->bus, sizeof(s->bus), dev, &esp_scsi_info);
+    scsi_bus_legacy_handle_cmdline(&s->bus);
 }
 
 static void sysbus_esp_hard_reset(DeviceState *dev)
diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c
index d52e6a7213..26e0af43bf 100644
--- a/hw/sparc/sun4m.c
+++ b/hw/sparc/sun4m.c
@@ -338,7 +338,6 @@ static void *sparc32_dma_init(hwaddr dma_base,
     sysbus_mmio_map(SYS_BUS_DEVICE(dma), 0, dma_base);
 
     sysbus_mmio_map(SYS_BUS_DEVICE(esp), 0, esp_base);
-    scsi_bus_legacy_handle_cmdline(&esp->esp.bus);
 
     sysbus_mmio_map(SYS_BUS_DEVICE(lance), 0, le_base);
 
-- 
2.45.2



  parent reply	other threads:[~2024-11-22 11:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-22 11:19 [PATCH 0/3] hw/scsi: Cleanup around scsi_bus_legacy_handle_cmdline() Philippe Mathieu-Daudé
2024-11-22 11:19 ` [PATCH 1/3] hw/scsi/spapr_vscsi: Call scsi_bus_legacy_handle_cmdline() in REALIZE Philippe Mathieu-Daudé
2024-11-22 11:19 ` [PATCH 2/3] hw/scsi/lsi53c895a: Call scsi_bus_legacy_handle_cmdline() once Philippe Mathieu-Daudé
2024-11-22 11:19 ` Philippe Mathieu-Daudé [this message]
2024-11-22 12:37 ` [PATCH 0/3] hw/scsi: Cleanup around scsi_bus_legacy_handle_cmdline() Thomas Huth
2024-11-22 12:53   ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241122111939.11936-4-philmd@linaro.org \
    --to=philmd@linaro.org \
    --cc=arikalo@gmail.com \
    --cc=atar4qemu@gmail.com \
    --cc=danielhb413@gmail.com \
    --cc=deller@gmx.de \
    --cc=fam@euphon.net \
    --cc=harshpb@linux.ibm.com \
    --cc=hpoussin@reactos.org \
    --cc=huth@tuxfamily.org \
    --cc=laurent@vivier.eu \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=mst@redhat.com \
    --cc=npiggin@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).