From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54758) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWlj3-0005B6-0S for qemu-devel@nongnu.org; Wed, 24 Sep 2014 08:31:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWliw-0000wF-LF for qemu-devel@nongnu.org; Wed, 24 Sep 2014 08:31:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50825) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWliw-0000vc-F3 for qemu-devel@nongnu.org; Wed, 24 Sep 2014 08:31:10 -0400 Message-ID: <5422B97D.2020003@redhat.com> Date: Wed, 24 Sep 2014 14:30:53 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1411559299-19042-1-git-send-email-imammedo@redhat.com> <1411559299-19042-27-git-send-email-imammedo@redhat.com> In-Reply-To: <1411559299-19042-27-git-send-email-imammedo@redhat.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [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: Igor Mammedov , 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, rth@twiddle.net Il 24/09/2014 13:48, Igor Mammedov ha scritto: > 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. Correct. usb-bot unfortunately is not hot-pluggable because we would plug it with no SCSI LUN inside. The guest would not be able to access it. We would have to delay the presentation of the usb-bot device until after the LUN is there. Perhaps some kind of transaction mechanism? However, usb-storage builds the outer USB device and the inner SCSI device at the same time, so it can be hot-plugged. What you do for usb-storage should also be done for lsi, esp, usb-uas, etc. Paolo