From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40466) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWoOz-0007Jh-PV for qemu-devel@nongnu.org; Wed, 24 Sep 2014 11:22:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWoOt-0005Du-De for qemu-devel@nongnu.org; Wed, 24 Sep 2014 11:22:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:28820) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWoOt-0005C3-5W for qemu-devel@nongnu.org; Wed, 24 Sep 2014 11:22:39 -0400 Date: Wed, 24 Sep 2014 17:22:24 +0200 From: Igor Mammedov Message-ID: <20140924172224.4aa2f3bb@nial.usersys.redhat.com> In-Reply-To: <1411563041.30748.3.camel@nilsson.home.kraxel.org> References: <1411559299-19042-1-git-send-email-imammedo@redhat.com> <1411559299-19042-27-git-send-email-imammedo@redhat.com> <1411563041.30748.3.camel@nilsson.home.kraxel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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: Gerd Hoffmann Cc: dmitry@daynix.com, mst@redhat.com, agraf@suse.de, qemu-devel@nongnu.org, cornelia.huck@de.ibm.com, amit.shah@redhat.com, pbonzini@redhat.com, borntraeger@de.ibm.com, rth@twiddle.net On Wed, 24 Sep 2014 14:50:41 +0200 Gerd Hoffmann wrote: > On Mi, 2014-09-24 at 11:48 +0000, Igor Mammedov wrote: > > usb-storage uses SCSI bus to provide underling storage > > (i.e. scsi-disk) and it's hotpluggable. > > No. usb-storage itself (the scsi hba) is hotpluggable, but the scsi > devices connected are not. Agree, I'm sorry for my bad English, under "it's hotpluggable" I've meant usb-storage. > > On the qemu side it isn't a problem, but the protocol has constrains. > First there is no way to signal devices coming and going, so the guest > wouldn't see them until reboot (or manual driver reload). Second for > multi-lun devices only the number of luns is reported and devices are > expected to have luns 0 .. $count-1. So with three devices connected > and the second being hot-unplugged you end up with an illegal > configuration. > > Therefore device initialization (IIRC) goes like this today: > > (1) add hba (i.e. usb-storage). > (2) add scsi device. > (3) turn off hotplug on the scsi bus. > (4) make the whole thing visible to the guest (usb_attach_device). > > cheers, > Gerd > >