diff options
author | Thomas Huth <thuth@redhat.com> | 2018-03-07 10:24:04 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2018-03-12 16:12:47 +0100 |
commit | 148b2ba1145af29a7afac349b8169790e06d6df4 (patch) | |
tree | 2012d476bace0df6d33a0328110ceb5229473365 /hw/scsi | |
parent | 7e563bfb8a5104ff0eed0fff8d13cbe63a25d17c (diff) | |
download | qemu-148b2ba1145af29a7afac349b8169790e06d6df4.zip |
hw/mips/jazz: 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 pica61 machine you now get:
$ mips64-softmmu/qemu-system-mips64 -M pica61 -cdrom x.iso
qemu-system-mips64: -cdrom x.iso: machine type does not support if=scsi,bus=0,unit=2
Fix it by calling scsi_bus_legacy_handle_cmdline() after creating the
corresponding SCSI controller.
Fixes: 1454509726719e0933c800fad00d6999752688ea
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1520414644-11535-1-git-send-email-thuth@redhat.com>
Reviewed-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/scsi')
-rw-r--r-- | hw/scsi/esp.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c index 45975c21e8..64ec285826 100644 --- a/hw/scsi/esp.c +++ b/hw/scsi/esp.c @@ -618,11 +618,11 @@ static const MemoryRegionOps sysbus_esp_mem_ops = { .valid.accepts = esp_mem_accepts, }; -void esp_init(hwaddr espaddr, int it_shift, - ESPDMAMemoryReadWriteFunc dma_memory_read, - ESPDMAMemoryReadWriteFunc dma_memory_write, - void *dma_opaque, qemu_irq irq, qemu_irq *reset, - qemu_irq *dma_enable) +ESPState *esp_init(hwaddr espaddr, int it_shift, + ESPDMAMemoryReadWriteFunc dma_memory_read, + ESPDMAMemoryReadWriteFunc dma_memory_write, + void *dma_opaque, qemu_irq irq, qemu_irq *reset, + qemu_irq *dma_enable) { DeviceState *dev; SysBusDevice *s; @@ -644,6 +644,8 @@ void esp_init(hwaddr espaddr, int it_shift, sysbus_mmio_map(s, 0, espaddr); *reset = qdev_get_gpio_in(dev, 0); *dma_enable = qdev_get_gpio_in(dev, 1); + + return esp; } static const struct SCSIBusInfo esp_scsi_info = { |