summaryrefslogtreecommitdiffstats
path: root/hw/scsi/scsi-disk.c
diff options
context:
space:
mode:
authorDaniel P. Berrangé2021-02-22 14:40:56 +0100
committerDaniel P. Berrangé2021-03-18 10:22:55 +0100
commit879be3af49132d232602e0ca783ec9b4112530fa (patch)
tree527298850da80a21e5df103a84300a716d9cc0d3 /hw/scsi/scsi-disk.c
parenthw/ide: remove 'ide-drive' device (diff)
downloadqemu-879be3af49132d232602e0ca783ec9b4112530fa.tar.gz
qemu-879be3af49132d232602e0ca783ec9b4112530fa.tar.xz
qemu-879be3af49132d232602e0ca783ec9b4112530fa.zip
hw/scsi: remove 'scsi-disk' device
The 'scsi-hd' and 'scsi-cd' devices provide suitable alternatives. Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'hw/scsi/scsi-disk.c')
-rw-r--r--hw/scsi/scsi-disk.c62
1 files changed, 0 insertions, 62 deletions
diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
index 2eaea7e637..3580e7ee61 100644
--- a/hw/scsi/scsi-disk.c
+++ b/hw/scsi/scsi-disk.c
@@ -2476,28 +2476,6 @@ static void scsi_cd_realize(SCSIDevice *dev, Error **errp)
aio_context_release(ctx);
}
-static void scsi_disk_realize(SCSIDevice *dev, Error **errp)
-{
- DriveInfo *dinfo;
- Error *local_err = NULL;
-
- warn_report("'scsi-disk' is deprecated, "
- "please use 'scsi-hd' or 'scsi-cd' instead");
-
- if (!dev->conf.blk) {
- scsi_realize(dev, &local_err);
- assert(local_err);
- error_propagate(errp, local_err);
- return;
- }
-
- dinfo = blk_legacy_dinfo(dev->conf.blk);
- if (dinfo && dinfo->media_cd) {
- scsi_cd_realize(dev, errp);
- } else {
- scsi_hd_realize(dev, errp);
- }
-}
static const SCSIReqOps scsi_disk_emulate_reqops = {
.size = sizeof(SCSIDiskReq),
@@ -3161,45 +3139,6 @@ static const TypeInfo scsi_block_info = {
};
#endif
-static Property scsi_disk_properties[] = {
- DEFINE_SCSI_DISK_PROPERTIES(),
- DEFINE_PROP_BIT("removable", SCSIDiskState, features,
- SCSI_DISK_F_REMOVABLE, false),
- DEFINE_PROP_BIT("dpofua", SCSIDiskState, features,
- SCSI_DISK_F_DPOFUA, false),
- DEFINE_PROP_UINT64("wwn", SCSIDiskState, qdev.wwn, 0),
- DEFINE_PROP_UINT64("port_wwn", SCSIDiskState, qdev.port_wwn, 0),
- DEFINE_PROP_UINT16("port_index", SCSIDiskState, port_index, 0),
- DEFINE_PROP_UINT64("max_unmap_size", SCSIDiskState, max_unmap_size,
- DEFAULT_MAX_UNMAP_SIZE),
- DEFINE_PROP_UINT64("max_io_size", SCSIDiskState, max_io_size,
- DEFAULT_MAX_IO_SIZE),
- DEFINE_PROP_INT32("scsi_version", SCSIDiskState, qdev.default_scsi_version,
- 5),
- DEFINE_PROP_END_OF_LIST(),
-};
-
-static void scsi_disk_class_initfn(ObjectClass *klass, void *data)
-{
- DeviceClass *dc = DEVICE_CLASS(klass);
- SCSIDeviceClass *sc = SCSI_DEVICE_CLASS(klass);
-
- sc->realize = scsi_disk_realize;
- sc->alloc_req = scsi_new_request;
- sc->unit_attention_reported = scsi_disk_unit_attention_reported;
- dc->fw_name = "disk";
- dc->desc = "virtual SCSI disk or CD-ROM (legacy)";
- dc->reset = scsi_disk_reset;
- device_class_set_props(dc, scsi_disk_properties);
- dc->vmsd = &vmstate_scsi_disk_state;
-}
-
-static const TypeInfo scsi_disk_info = {
- .name = "scsi-disk",
- .parent = TYPE_SCSI_DISK_BASE,
- .class_init = scsi_disk_class_initfn,
-};
-
static void scsi_disk_register_types(void)
{
type_register_static(&scsi_disk_base_info);
@@ -3208,7 +3147,6 @@ static void scsi_disk_register_types(void)
#ifdef __linux__
type_register_static(&scsi_block_info);
#endif
- type_register_static(&scsi_disk_info);
}
type_init(scsi_disk_register_types)