void io_subsystem_reset(void) { DeviceState *css, *sclp; css = DEVICE(object_resolve_path_type("", "virtual-css-bridge", NULL)); if (css) { qdev_reset_all(css); } sclp = DEVICE(object_resolve_path_type("", "s390-sclp-event-facility", NULL)); if (sclp) { qdev_reset_all(sclp); } }
static int pci_piix3_xen_ide_unplug(DeviceState *dev) { PCIDevice *pci_dev; PCIIDEState *pci_ide; DriveInfo *di; int i = 0; pci_dev = DO_UPCAST(PCIDevice, qdev, dev); pci_ide = DO_UPCAST(PCIIDEState, dev, pci_dev); for (; i < 3; i++) { di = drive_get_by_index(IF_IDE, i); if (di != NULL && !di->media_cd) { DeviceState *ds = bdrv_get_attached_dev(di->bdrv); if (ds) { bdrv_detach_dev(di->bdrv, ds); } bdrv_close(di->bdrv); pci_ide->bus[di->bus].ifs[di->unit].bs = NULL; drive_put_ref(di); } } qdev_reset_all(&(pci_ide->dev.qdev)); return 0; }
int pci_piix3_xen_ide_unplug(DeviceState *dev) { PCIIDEState *pci_ide; DriveInfo *di; int i; IDEDevice *idedev; pci_ide = PCI_IDE(dev); for (i = 0; i < 4; i++) { di = drive_get_by_index(IF_IDE, i); if (di != NULL && !di->media_cd) { BlockBackend *blk = blk_by_legacy_dinfo(di); DeviceState *ds = blk_get_attached_dev(blk); if (ds) { blk_detach_dev(blk, ds); } pci_ide->bus[di->bus].ifs[di->unit].blk = NULL; if (!(i % 2)) { idedev = pci_ide->bus[di->bus].master; } else { idedev = pci_ide->bus[di->bus].slave; } idedev->conf.blk = NULL; monitor_remove_blk(blk); blk_unref(blk); } } qdev_reset_all(DEVICE(dev)); return 0; }
void subsystem_reset(void) { DeviceState *dev; int i; for (i = 0; i < ARRAY_SIZE(reset_dev_types); i++) { dev = DEVICE(object_resolve_path_type("", reset_dev_types[i], NULL)); if (dev) { qdev_reset_all(dev); } } }
void io_subsystem_reset(void) { DeviceState *css, *sclp, *flic, *diag288; css = DEVICE(object_resolve_path_type("", "virtual-css-bridge", NULL)); if (css) { qdev_reset_all(css); } sclp = DEVICE(object_resolve_path_type("", "s390-sclp-event-facility", NULL)); if (sclp) { qdev_reset_all(sclp); } flic = DEVICE(object_resolve_path_type("", "s390-flic", NULL)); if (flic) { qdev_reset_all(flic); } diag288 = DEVICE(object_resolve_path_type("", "diag288", NULL)); if (diag288) { qdev_reset_all(diag288); } }
int pci_piix3_xen_ide_unplug(DeviceState *dev) { PCIIDEState *pci_ide; DriveInfo *di; int i = 0; pci_ide = PCI_IDE(dev); for (; i < 3; i++) { di = drive_get_by_index(IF_IDE, i); if (di != NULL && !di->media_cd) { DeviceState *ds = bdrv_get_attached_dev(di->bdrv); if (ds) { bdrv_detach_dev(di->bdrv, ds); } bdrv_close(di->bdrv); pci_ide->bus[di->bus].ifs[di->unit].bs = NULL; drive_del(di); } } qdev_reset_all(DEVICE(dev)); return 0; }
static void adb_device_reset(ADBDevice *d) { qdev_reset_all(DEVICE(d)); }