[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 3/9] hw/ppc/prep: Fix implicit creation of "-drive if=s
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 3/9] hw/ppc/prep: Fix implicit creation of "-drive if=scsi" devices |
Date: |
Thu, 15 Mar 2018 15:18:57 +1100 |
From: Thomas Huth <address@hidden>
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 <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/prep.c | 2 +-
hw/scsi/lsi53c895a.c | 7 +++++++
include/hw/pci/pci.h | 1 +
3 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c
index 096d4d4cfb..3361509a85 100644
--- a/hw/ppc/prep.c
+++ b/hw/ppc/prep.c
@@ -788,7 +788,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);
+}
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
index d8c18c7fa4..e255941b5a 100644
--- a/include/hw/pci/pci.h
+++ b/include/hw/pci/pci.h
@@ -708,6 +708,7 @@ PCIDevice *pci_create(PCIBus *bus, int devfn, const char
*name);
PCIDevice *pci_create_simple(PCIBus *bus, int devfn, const char *name);
void lsi53c895a_create(PCIBus *bus);
+void lsi53c810_create(PCIBus *bus, int devfn);
qemu_irq pci_allocate_irq(PCIDevice *pci_dev);
void pci_set_irq(PCIDevice *pci_dev, int level);
--
2.14.3
- [Qemu-ppc] [PULL 0/9] ppc-for-2.12 queue 20180315, David Gibson, 2018/03/15
- [Qemu-ppc] [PULL 2/9] tests/boot-serial: Check the 40p machine, too, David Gibson, 2018/03/15
- [Qemu-ppc] [PULL 3/9] hw/ppc/prep: Fix implicit creation of "-drive if=scsi" devices,
David Gibson <=
- [Qemu-ppc] [PULL 4/9] hw/misc/macio: Mark the macio devices with user_creatable = false, David Gibson, 2018/03/15
- [Qemu-ppc] [PULL 1/9] sii3112: Remove unneeded exit function, David Gibson, 2018/03/15
- [Qemu-ppc] [PULL 8/9] tests/boot-serial: Test the sam460ex board, David Gibson, 2018/03/15
- [Qemu-ppc] [PULL 6/9] hw/ppc/spapr: Allow "spapr-vlan" as NIC model name beside "ibmveth", David Gibson, 2018/03/15
- [Qemu-ppc] [PULL 5/9] PPC e500: Fix gap between u-boot and kernel, David Gibson, 2018/03/15
- [Qemu-ppc] [PULL 9/9] target/ppc: fix tlbsync to check privilege level depending on GTSE, David Gibson, 2018/03/15
- [Qemu-ppc] [PULL 7/9] ppc440_pcix: Change some error_report to qemu_log_mask(LOG_UNIMP, ...), David Gibson, 2018/03/15
- Re: [Qemu-ppc] [PULL 0/9] ppc-for-2.12 queue 20180315, Peter Maydell, 2018/03/16