[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH for-4.1 3/4] hw/isa/superio: Support chipsets with n
From: |
Philippe Mathieu-Daudé |
Subject: |
[Qemu-devel] [PATCH for-4.1 3/4] hw/isa/superio: Support chipsets with no Floppy Disk controller |
Date: |
Fri, 5 Apr 2019 00:12:37 +0200 |
Not all Super I/O chipsets provide a Floppy Disk Controller.
Without this change, using a Super I/O with no FDC would abort QEMU with:
Initialization of device isa-fdc failed: ISA controller does not support DMA
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
hw/isa/isa-superio.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/isa/isa-superio.c b/hw/isa/isa-superio.c
index b0761ea1f96..6956f06d529 100644
--- a/hw/isa/isa-superio.c
+++ b/hw/isa/isa-superio.c
@@ -113,7 +113,8 @@ static void isa_superio_realize(DeviceState *dev, Error
**errp)
}
/* Floppy disc */
- if (!k->floppy.is_enabled || k->floppy.is_enabled(s, 0)) {
+ if (k->floppy.count
+ && (!k->floppy.is_enabled || k->floppy.is_enabled(s, 0))) {
isa = isa_create(bus, "isa-fdc");
d = DEVICE(isa);
if (k->floppy.get_iobase) {
--
2.20.1