All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: qemu-devel@nongnu.org, Thomas Huth <thuth@redhat.com>
Cc: "Aurelien Jarno" <aurelien@aurel32.net>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Aleksandar Markovic" <amarkovic@wavecomp.com>,
	"Aleksandar Rikalo" <arikalo@wavecomp.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>
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	[thread overview]
Message-ID: <20190404221238.12468-4-philmd@redhat.com> (raw)
In-Reply-To: <20190404221238.12468-1-philmd@redhat.com>

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é <philmd@redhat.com>
---
 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

  parent reply	other threads:[~2019-04-04 22:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-04 22:12 [Qemu-devel] [PATCH for-4.1 0/4] hw/mips/r4k: Refactor the Super I/O chipset Philippe Mathieu-Daudé
2019-04-04 22:12 ` [Qemu-devel] [PATCH for-4.1 1/4] hw/isa/superio: Rename a variable Philippe Mathieu-Daudé
2019-04-05  4:14   ` Thomas Huth
2019-04-05  4:14     ` Thomas Huth
2019-04-05  9:32     ` Philippe Mathieu-Daudé
2019-04-05  9:32       ` Philippe Mathieu-Daudé
2019-04-04 22:12 ` [Qemu-devel] [PATCH for-4.1 2/4] hw/isa/superio: Support more than one IDE bus Philippe Mathieu-Daudé
2019-04-04 22:12 ` Philippe Mathieu-Daudé [this message]
2019-04-05  4:24   ` [Qemu-devel] [PATCH for-4.1 3/4] hw/isa/superio: Support chipsets with no Floppy Disk controller Thomas Huth
2019-04-05  4:24     ` Thomas Huth
2019-04-04 22:12 ` [Qemu-devel] [PATCH for-4.1 4/4] hw/mips/r4k: Refactor the Super I/O chipset Philippe Mathieu-Daudé
2019-04-05  4:51   ` Thomas Huth
2019-04-05  4:51     ` Thomas Huth
2019-04-05  9:49     ` Philippe Mathieu-Daudé
2019-04-05  9:49       ` Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190404221238.12468-4-philmd@redhat.com \
    --to=philmd@redhat.com \
    --cc=amarkovic@wavecomp.com \
    --cc=arikalo@wavecomp.com \
    --cc=aurelien@aurel32.net \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.