From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45363) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWl4v-0005Tx-Gy for qemu-devel@nongnu.org; Wed, 24 Sep 2014 07:49:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWl4p-0006EK-Bf for qemu-devel@nongnu.org; Wed, 24 Sep 2014 07:49:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39201) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWl4p-0006DN-4o for qemu-devel@nongnu.org; Wed, 24 Sep 2014 07:49:43 -0400 From: Igor Mammedov Date: Wed, 24 Sep 2014 11:48:15 +0000 Message-Id: <1411559299-19042-27-git-send-email-imammedo@redhat.com> In-Reply-To: <1411559299-19042-1-git-send-email-imammedo@redhat.com> References: <1411559299-19042-1-git-send-email-imammedo@redhat.com> Subject: [Qemu-devel] [PATCH 26/30] usb-storage: make its storage SCSI bus hotpluggable explicitly List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: dmitry@daynix.com, borntraeger@de.ibm.com, mst@redhat.com, agraf@suse.de, cornelia.huck@de.ibm.com, kraxel@redhat.com, amit.shah@redhat.com, pbonzini@redhat.com, rth@twiddle.net usb-storage uses SCSI bus to provide underling storage (i.e. scsi-disk) and it's hotpluggable. In addition during usb-storage hotplug bus_add_child() won't allow to add scsi-disk to SCSI bus owned by usb-storage if bus is not hotpluggable. By default SCSI bus was alway hotpluggable even if an owner didn't support hotplug. It will change once BusState.allow_hotplug field is dropped and SCSI bus will be only hotpluggable only if bus owner implements HOTPLUG_HANDLER interface. So make usb-storage implement HOTPLUG_HANDLER interface to keep its SCSI bus hotpluggable. Signed-off-by: Igor Mammedov --- hw/usb/dev-storage.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c index bfa71c7..4ad4ec7 100644 --- a/hw/usb/dev-storage.c +++ b/hw/usb/dev-storage.c @@ -779,6 +779,10 @@ static const TypeInfo msd_info = { .parent = TYPE_USB_DEVICE, .instance_size = sizeof(MSDState), .class_init = usb_msd_class_initfn_storage, + .interfaces = (InterfaceInfo[]) { + { TYPE_HOTPLUG_HANDLER }, + { } + } }; static const TypeInfo bot_info = { -- 1.8.3.1