Received: from eggs.gnu.org ([2001:4830:134:3::10]:37720) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeEyA-0006GE-NQ for qemu-devel@nongnu.org; Tue, 14 Oct 2014 23:09:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XeExz-0004sY-Ty for qemu-devel@nongnu.org; Tue, 14 Oct 2014 23:09:46 -0400 Received: from cantor2.suse.de ([195.135.220.15]:49364 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeExz-0004sK-NL for qemu-devel@nongnu.org; Tue, 14 Oct 2014 23:09:35 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 15 Oct 2014 05:09:09 +0200 Message-Id: <1413342561-4754-36-git-send-email-afaerber@suse.de> In-Reply-To: <1413342561-4754-1-git-send-email-afaerber@suse.de> References: <1413342561-4754-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 35/47] usb-bot: Mark device as non hotpluggable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Igor Mammedov , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Gerd Hoffmann From: Igor Mammedov usb-bot creates SCSI bus and immediately makes it non hotpluggable which was making not possible to hotplug usb-bot since QEMU would abort at bus_add_child(scsi-hd) time when usb-bot is realized. Mark usb-bot as not hotpluggable so that attempt to hotplug it would error out even before it gets to device initialization point. Signed-off-by: Igor Mammedov Signed-off-by: Andreas F=C3=A4rber --- hw/usb/dev-storage.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c index bd7cc53..a207507 100644 --- a/hw/usb/dev-storage.c +++ b/hw/usb/dev-storage.c @@ -770,9 +770,11 @@ static void usb_msd_class_initfn_storage(ObjectClass= *klass, void *data) static void usb_msd_class_initfn_bot(ObjectClass *klass, void *data) { USBDeviceClass *uc =3D USB_DEVICE_CLASS(klass); + DeviceClass *dc =3D DEVICE_CLASS(klass); =20 uc->realize =3D usb_msd_realize_bot; usb_msd_class_initfn_common(klass); + dc->hotpluggable =3D false; } =20 static const TypeInfo msd_info =3D { --=20 1.8.4.5