Commit 877eb21d authored by Mark Cave-Ayland's avatar Mark Cave-Ayland Committed by David Gibson
Browse files

scsi: move lsi53c8xx_create() callers to lsi53c8xx_handle_legacy_cmdline()



As part of commits a64aa578 "hw: Deprecate -drive if=scsi with non-onboard
HBAs" and b891538e "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: default avatarMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Peter Maydell <peter.maydell@linaro.org> [arm parts]
Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
parent f74a4f3a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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--;
        }
    }
+2 −1
Original line number Diff line number Diff line
@@ -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--;
    }

+3 −1
Original line number Diff line number Diff line
@@ -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++) {
+3 −1
Original line number Diff line number Diff line
@@ -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);