qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH for-2.3 2/3] sdhci: Make device "sdhci-pci" unavaila


From: Markus Armbruster
Subject: [Qemu-devel] [PATCH for-2.3 2/3] sdhci: Make device "sdhci-pci" unavailable with -device
Date: Mon, 23 Mar 2015 20:09:49 +0100

Due to misuse of drive_get_next(), -device sdhci can connect to a
-drive if=sd,...  If you can't see what's wrong here, check out the
FIXME in sdhci_initfn() and the commit that added it.

We can't fix this in time for the release, but since the device is new
in 2.3, we can disable it before this mistake becomes ABI: set
cannot_instantiate_with_device_add_yet.

Signed-off-by: Markus Armbruster <address@hidden>
---
 hw/sd/sdhci.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c
index f056c52..ab13505 100644
--- a/hw/sd/sdhci.c
+++ b/hw/sd/sdhci.c
@@ -1254,6 +1254,8 @@ static void sdhci_pci_class_init(ObjectClass *klass, void 
*data)
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
     dc->vmsd = &sdhci_vmstate;
     dc->props = sdhci_properties;
+    /* Reason: realize() method uses drive_get_next() */
+    dc->cannot_instantiate_with_device_add_yet = true;
 }
 
 static const TypeInfo sdhci_pci_info = {
-- 
1.9.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]