summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2018-03-07 10:08:14 +0100
committerDavid Gibson <david@gibson.dropbear.id.au>2018-03-18 18:27:23 +1100
commitb891538e81d33e59e1df9ce489e7118b7a1e7857 (patch)
tree4c9d3be15eb3148ee4290500eac3df925276ed66 /hw
parentd7d15a6e34cb6750686c5cdd9bfbd39cad16f567 (diff)
downloadqemu-b891538e81d33e59e1df9ce489e7118b7a1e7857.zip
hw/ppc/prep: Fix implicit creation of "-drive if=scsi" devices
The global hack for creating SCSI devices has recently been removed, but this apparently broke SCSI devices on some boards that were not ready for this change yet. For the 40p machine you now get: $ ppc64-softmmu/qemu-system-ppc64 -M 40p -cdrom x.iso qemu-system-ppc64: -cdrom x.iso: machine type does not support if=scsi,bus=0,unit=2 Fix it by providing a lsi53c810_create() function that takes care of calling scsi_bus_legacy_handle_cmdline() after creating the corresponding SCSI controller. Fixes: 1454509726719e0933c800fad00d6999752688ea Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw')
-rw-r--r--hw/ppc/prep.c2
-rw-r--r--hw/scsi/lsi53c895a.c7
2 files changed, 8 insertions, 1 deletions
diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c
index 5c78503069..a1e7219db6 100644
--- a/hw/ppc/prep.c
+++ b/hw/ppc/prep.c
@@ -787,7 +787,7 @@ static void ibm_40p_init(MachineState *machine)
qdev_prop_set_uint32(dev, "equipment", 0xc0);
qdev_init_nofail(dev);
- pci_create_simple(pci_bus, PCI_DEVFN(1, 0), "lsi53c810");
+ lsi53c810_create(pci_bus, PCI_DEVFN(1, 0));
/* XXX: s3-trio at PCI_DEVFN(2, 0) */
pci_vga_init(pci_bus);
diff --git a/hw/scsi/lsi53c895a.c b/hw/scsi/lsi53c895a.c
index f3d4c4d230..160657f4b9 100644
--- a/hw/scsi/lsi53c895a.c
+++ b/hw/scsi/lsi53c895a.c
@@ -2279,3 +2279,10 @@ void lsi53c895a_create(PCIBus *bus)
scsi_bus_legacy_handle_cmdline(&s->bus);
}
+
+void lsi53c810_create(PCIBus *bus, int devfn)
+{
+ LSIState *s = LSI53C895A(pci_create_simple(bus, devfn, "lsi53c810"));
+
+ scsi_bus_legacy_handle_cmdline(&s->bus);
+}