[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 11/14] scsi: move lsi53c8xx_create() callers to lsi53c8
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 11/14] scsi: move lsi53c8xx_create() callers to lsi53c8xx_handle_legacy_cmdline() |
Date: |
Tue, 25 Sep 2018 17:01:51 +1000 |
From: Mark Cave-Ayland <address@hidden>
As part of commits a64aa5785d "hw: Deprecate -drive if=scsi with non-onboard
HBAs" and b891538e81 "hw/ppc/prep: Fix implicit creation of "-drive if=scsi"
devices" the lsi53c895a_create() and lsi53c810_create() functions were added
to wrap pci_create_simple() and scsi_bus_legacy_handle_cmdline().
Unfortunately this prevents us from changing qdev properties on the device
and/or changing the PCI configuration. By switching over to using the new
lsi53c8xx_handle_legacy_cmdline() function then the caller can now configure
and realize the LSI SCSI device exactly as required.
Signed-off-by: Mark Cave-Ayland <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Acked-by: Peter Maydell <address@hidden> [arm parts]
Signed-off-by: David Gibson <address@hidden>
---
hw/arm/realview.c | 3 ++-
hw/arm/versatilepb.c | 3 ++-
hw/hppa/machine.c | 4 +++-
hw/ppc/prep.c | 4 +++-
4 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/hw/arm/realview.c b/hw/arm/realview.c
index ab8c14fde3..242f5a87b6 100644
--- a/hw/arm/realview.c
+++ b/hw/arm/realview.c
@@ -257,7 +257,8 @@ static void realview_init(MachineState *machine,
}
n = drive_get_max_bus(IF_SCSI);
while (n >= 0) {
- lsi53c895a_create(pci_bus);
+ dev = DEVICE(pci_create_simple(pci_bus, -1, "lsi53c895a"));
+ lsi53c8xx_handle_legacy_cmdline(dev);
n--;
}
}
diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c
index 8b74857059..22b09a1e61 100644
--- a/hw/arm/versatilepb.c
+++ b/hw/arm/versatilepb.c
@@ -278,7 +278,8 @@ static void versatile_init(MachineState *machine, int
board_id)
}
n = drive_get_max_bus(IF_SCSI);
while (n >= 0) {
- lsi53c895a_create(pci_bus);
+ dev = DEVICE(pci_create_simple(pci_bus, -1, "lsi53c895a"));
+ lsi53c8xx_handle_legacy_cmdline(dev);
n--;
}
diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
index cf7c61c6cc..0fb8fb877e 100644
--- a/hw/hppa/machine.c
+++ b/hw/hppa/machine.c
@@ -59,6 +59,7 @@ static void machine_hppa_init(MachineState *machine)
const char *kernel_filename = machine->kernel_filename;
const char *kernel_cmdline = machine->kernel_cmdline;
const char *initrd_filename = machine->initrd_filename;
+ DeviceState *dev;
PCIBus *pci_bus;
ISABus *isa_bus;
qemu_irq rtc_irq, serial_irq;
@@ -115,7 +116,8 @@ static void machine_hppa_init(MachineState *machine)
}
/* SCSI disk setup. */
- lsi53c895a_create(pci_bus);
+ dev = DEVICE(pci_create_simple(pci_bus, -1, "lsi53c895a"));
+ lsi53c8xx_handle_legacy_cmdline(dev);
/* Network setup. e1000 is good enough, failing Tulip support. */
for (i = 0; i < nb_nics; i++) {
diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c
index 4bb831c3e6..7e2c70b92a 100644
--- a/hw/ppc/prep.c
+++ b/hw/ppc/prep.c
@@ -700,7 +700,9 @@ static void ibm_40p_init(MachineState *machine)
qdev_prop_set_uint32(dev, "equipment", 0xc0);
qdev_init_nofail(dev);
- lsi53c810_create(pci_bus, PCI_DEVFN(1, 0));
+ dev = DEVICE(pci_create_simple(pci_bus, PCI_DEVFN(1, 0),
+ "lsi53c810"));
+ lsi53c8xx_handle_legacy_cmdline(dev);
/* XXX: s3-trio at PCI_DEVFN(2, 0) */
pci_vga_init(pci_bus);
--
2.17.1
- [Qemu-ppc] [PULL 06/14] spapr: introduce a spapr_irq class 'nr_msis' attribute, (continued)
- [Qemu-ppc] [PULL 06/14] spapr: introduce a spapr_irq class 'nr_msis' attribute, David Gibson, 2018/09/25
- [Qemu-ppc] [PULL 02/14] target/ppc/cpu-models: Re-group the 970 CPUs together again, David Gibson, 2018/09/25
- [Qemu-ppc] [PULL 05/14] 40p: use OR gate to wire up raven PCI interrupts, David Gibson, 2018/09/25
- [Qemu-ppc] [PULL 07/14] spapr: increase the size of the IRQ number space, David Gibson, 2018/09/25
- [Qemu-ppc] [PULL 04/14] raven: some minor IRQ-related tidy-ups, David Gibson, 2018/09/25
- [Qemu-ppc] [PULL 01/14] Record history of ppcemb target in common.json, David Gibson, 2018/09/25
- [Qemu-ppc] [PULL 12/14] scsi: remove unused lsi53c895a_create() and lsi53c810_create() functions, David Gibson, 2018/09/25
- [Qemu-ppc] [PULL 08/14] spapr_pci: add an extra 'nr_msis' argument to spapr_populate_pci_dt, David Gibson, 2018/09/25
- [Qemu-ppc] [PULL 09/14] sm501: Adjust endianness of pixel value in rectangle fill, David Gibson, 2018/09/25
- [Qemu-ppc] [PULL 14/14] 40p: add fixed IRQ routing for LSI SCSI device, David Gibson, 2018/09/25
- [Qemu-ppc] [PULL 11/14] scsi: move lsi53c8xx_create() callers to lsi53c8xx_handle_legacy_cmdline(),
David Gibson <=
- [Qemu-ppc] [PULL 10/14] scsi: add lsi53c8xx_handle_legacy_cmdline() function, David Gibson, 2018/09/25
- [Qemu-ppc] [PULL 13/14] lsi53c895a: add optional external IRQ via qdev, David Gibson, 2018/09/25
- Re: [Qemu-ppc] [PULL 00/14] ppc-for-3.1 queue 20180925, Peter Maydell, 2018/09/25