aboutsummaryrefslogtreecommitdiff
path: root/hw/acpi_piix4.c
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2010-09-06 16:46:18 +0900
committerMichael S. Tsirkin <mst@redhat.com>2010-09-07 20:10:04 +0300
commit5beb8ad503c88a76f2b8106c3b74b4ce485a60e1 (patch)
tree4d2a97c57cdf73bb0f04c631330a41c9ad78be31 /hw/acpi_piix4.c
parentf4c817e000e50e9a0db8f95ce6496628bd70733d (diff)
pci: call hotplug callback even when not hotplug case for later use.
call hotplug callback even when not hotplug case for later use. And move hotplug check into hotplug callback. PCIE slot needs this for card presence detection. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/acpi_piix4.c')
-rw-r--r--hw/acpi_piix4.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c
index bfa1d9a1ae..24dfcf2039 100644
--- a/hw/acpi_piix4.c
+++ b/hw/acpi_piix4.c
@@ -611,6 +611,9 @@ static int piix4_device_hotplug(DeviceState *qdev, PCIDevice *dev, int state)
PIIX4PMState *s = DO_UPCAST(PIIX4PMState, dev,
DO_UPCAST(PCIDevice, qdev, qdev));
+ if (!dev->qdev.hotplugged)
+ return 0;
+
s->pci0_status.up = 0;
s->pci0_status.down = 0;
if (state) {