From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 21/22] kill dead nic unplug code.
Date: Wed, 21 Oct 2009 15:25:42 +0200 [thread overview]
Message-ID: <1256131543-28416-22-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1256131543-28416-1-git-send-email-kraxel@redhat.com>
Cleanup on unplug happens via qdev->exit() callback now.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/acpi.c | 3 ---
hw/device-hotplug.c | 16 ----------------
hw/pci-hotplug.c | 25 -------------------------
sysemu.h | 4 ----
4 files changed, 0 insertions(+), 48 deletions(-)
diff --git a/hw/acpi.c b/hw/acpi.c
index d73aee9..dcc2c86 100644
--- a/hw/acpi.c
+++ b/hw/acpi.c
@@ -702,9 +702,6 @@ static void pciej_write(void *opaque, uint32_t addr, uint32_t val)
QLIST_FOREACH_SAFE(qdev, &bus->children, sibling, next) {
dev = DO_UPCAST(PCIDevice, qdev, qdev);
if (PCI_SLOT(dev->devfn) == slot) {
-#if defined (TARGET_I386)
- pci_device_hot_remove_success(dev);
-#endif
qdev_free(qdev);
}
}
diff --git a/hw/device-hotplug.c b/hw/device-hotplug.c
index c0cfd31..9cc8376 100644
--- a/hw/device-hotplug.c
+++ b/hw/device-hotplug.c
@@ -46,19 +46,3 @@ DriveInfo *add_init_drive(const char *optstr)
return dinfo;
}
-
-void destroy_nic(dev_match_fn *match_fn, void *arg)
-{
- int i;
- NICInfo *nic;
-
- for (i = 0; i < MAX_NICS; i++) {
- nic = &nd_table[i];
- if (nic->used) {
- if (nic->private && match_fn(nic->private, arg)) {
- qemu_del_vlan_client(nic->vc);
- net_client_uninit(nic);
- }
- }
- }
-}
diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c
index 35fa290..4673b89 100644
--- a/hw/pci-hotplug.c
+++ b/hw/pci-hotplug.c
@@ -234,28 +234,3 @@ void do_pci_device_hot_remove(Monitor *mon, const QDict *qdict)
{
pci_device_hot_remove(mon, qdict_get_str(qdict, "pci_addr"));
}
-
-static int pci_match_fn(void *dev_private, void *arg)
-{
- PCIDevice *dev = dev_private;
- PCIDevice *match = arg;
-
- return (dev == match);
-}
-
-/*
- * OS has executed _EJ0 method, we now can remove the device
- */
-void pci_device_hot_remove_success(PCIDevice *d)
-{
- int class_code;
-
- class_code = d->config_read(d, PCI_CLASS_DEVICE+1, 1);
-
- switch(class_code) {
- case PCI_BASE_CLASS_NETWORK:
- destroy_nic(pci_match_fn, d);
- break;
- }
-}
-
diff --git a/sysemu.h b/sysemu.h
index 763861d..cda5848 100644
--- a/sysemu.h
+++ b/sysemu.h
@@ -202,17 +202,13 @@ extern DriveInfo *drive_init(QemuOpts *arg, void *machine, int *fatal_error);
/* device-hotplug */
-typedef int (dev_match_fn)(void *dev_private, void *arg);
-
DriveInfo *add_init_drive(const char *opts);
-void destroy_nic(dev_match_fn *match_fn, void *arg);
/* pci-hotplug */
void pci_device_hot_add(Monitor *mon, const QDict *qdict);
void drive_hot_add(Monitor *mon, const QDict *qdict);
void pci_device_hot_remove(Monitor *mon, const char *pci_addr);
void do_pci_device_hot_remove(Monitor *mon, const QDict *qdict);
-void pci_device_hot_remove_success(PCIDevice *dev);
/* serial ports */
--
1.6.2.5
next prev parent reply other threads:[~2009-10-21 13:26 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-21 13:25 [Qemu-devel] [PATCH 01/22] qdev-ify network cards Gerd Hoffmann
2009-10-21 13:25 ` [Qemu-devel] [PATCH 01/22] net: add macaddr type Gerd Hoffmann
2009-10-21 13:25 ` [Qemu-devel] [PATCH 02/22] qdev: mac addr property fixups Gerd Hoffmann
2009-10-21 13:25 ` [Qemu-devel] [PATCH 03/22] qdev: add netdev property Gerd Hoffmann
2009-10-21 13:25 ` [Qemu-devel] [PATCH 04/22] qdev: add vlan property Gerd Hoffmann
2009-10-21 13:25 ` [Qemu-devel] [PATCH 05/22] qdev/net: common nic property bits Gerd Hoffmann
2009-10-21 13:25 ` [Qemu-devel] [PATCH 06/22] ne2k_isa: use qdev properties for configuration Gerd Hoffmann
2009-10-21 13:25 ` [Qemu-devel] [PATCH 07/22] qdev: add qdev_prop_exists() Gerd Hoffmann
2009-10-21 13:25 ` [Qemu-devel] [PATCH 08/22] prepare pci nic init path for qdev property configuration Gerd Hoffmann
2009-10-21 13:25 ` [Qemu-devel] [PATCH 09/22] ne2k_pci: use qdev properties for configuration Gerd Hoffmann
2009-10-21 13:25 ` [Qemu-devel] [PATCH 10/22] e1000: " Gerd Hoffmann
2009-10-21 13:25 ` [Qemu-devel] [PATCH 11/22] pcnet: " Gerd Hoffmann
2009-10-21 13:25 ` [Qemu-devel] [PATCH 12/22] pcnet: split away lance.c (sparc32 code) Gerd Hoffmann
2009-10-21 13:25 ` [Qemu-devel] [PATCH 13/22] rtl8139: use qdev properties for configuration Gerd Hoffmann
2009-10-21 13:25 ` [Qemu-devel] [PATCH 14/22] virtio: " Gerd Hoffmann
2009-10-28 14:07 ` [Qemu-devel] [PATCH] virtio-net: fix macaddr config regression Mark McLoughlin
2009-10-21 13:25 ` [Qemu-devel] [PATCH 15/22] eepro100: use qdev properties for configuration Gerd Hoffmann
2009-10-21 13:25 ` [Qemu-devel] [PATCH 16/22] smc91c111: " Gerd Hoffmann
2009-10-21 13:25 ` [Qemu-devel] [PATCH 17/22] xilinx_ethlite: " Gerd Hoffmann
2009-10-21 13:25 ` [Qemu-devel] [PATCH 18/22] stellaris_enet: " Gerd Hoffmann
2009-10-21 13:25 ` [Qemu-devel] [PATCH 19/22] musicpal: " Gerd Hoffmann
2009-10-21 13:25 ` [Qemu-devel] [PATCH 20/22] zap DeviceState->nd Gerd Hoffmann
2009-10-21 13:25 ` Gerd Hoffmann [this message]
2009-10-21 13:25 ` [Qemu-devel] [PATCH 22/22] pc.c: only load e1000 rom Gerd Hoffmann
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=1256131543-28416-22-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).