From 0c63237a90f37fffe8a8016f24f61bb228653e86 Mon Sep 17 00:00:00 2001 From: Shannon Zhao Date: Wed, 10 Jun 2015 23:04:32 +0800 Subject: virtio-scsi: move qdev properties into virtio-scsi.c As only one place in virtio-scsi.c uses DEFINE_VIRTIO_SCSI_PROPERTIES and DEFINE_VIRTIO_SCSI_FEATURES, there is no need to expose them. Inline them into virtio-scsi.c to avoid wrongly use. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao Reviewed-by: Paolo Bonzini Acked-by: Cornelia Huck Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/scsi/virtio-scsi.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'hw/scsi/virtio-scsi.c') diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index b0dee29..f7d3c7c 100644 --- a/hw/scsi/virtio-scsi.c +++ b/hw/scsi/virtio-scsi.c @@ -948,8 +948,17 @@ static void virtio_scsi_device_unrealize(DeviceState *dev, Error **errp) } static Property virtio_scsi_properties[] = { - DEFINE_VIRTIO_SCSI_PROPERTIES(VirtIOSCSI, parent_obj.conf), - DEFINE_VIRTIO_SCSI_FEATURES(VirtIOSCSI, host_features), + DEFINE_PROP_UINT32("num_queues", VirtIOSCSI, parent_obj.conf.num_queues, 1), + DEFINE_PROP_UINT32("max_sectors", VirtIOSCSI, parent_obj.conf.max_sectors, + 0xFFFF), + DEFINE_PROP_UINT32("cmd_per_lun", VirtIOSCSI, parent_obj.conf.cmd_per_lun, + 128), + DEFINE_PROP_BIT("any_layout", VirtIOSCSI, host_features, + VIRTIO_F_ANY_LAYOUT, true), + DEFINE_PROP_BIT("hotplug", VirtIOSCSI, host_features, + VIRTIO_SCSI_F_HOTPLUG, true), + DEFINE_PROP_BIT("param_change", VirtIOSCSI, host_features, + VIRTIO_SCSI_F_CHANGE, true), DEFINE_PROP_END_OF_LIST(), }; -- cgit v1.1