From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34577) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWo45-0001Qp-N1 for qemu-devel@nongnu.org; Wed, 24 Sep 2014 11:01:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWo3w-0007hP-Fc for qemu-devel@nongnu.org; Wed, 24 Sep 2014 11:01:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35697) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWo3w-0007ex-8v for qemu-devel@nongnu.org; Wed, 24 Sep 2014 11:01:00 -0400 Date: Wed, 24 Sep 2014 17:00:45 +0200 From: Igor Mammedov Message-ID: <20140924170045.57d3846a@nial.usersys.redhat.com> In-Reply-To: <5422B5B8.6010605@redhat.com> References: <1411559299-19042-1-git-send-email-imammedo@redhat.com> <1411559299-19042-22-git-send-email-imammedo@redhat.com> <5422B5B8.6010605@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 21/30] scsi: make scsi_bus_new() assign hotplug controller List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: cornelia.huck@de.ibm.com, mst@redhat.com, amit.shah@redhat.com, agraf@suse.de, qemu-devel@nongnu.org, borntraeger@de.ibm.com, kraxel@redhat.com, dmitry@daynix.com, rth@twiddle.net On Wed, 24 Sep 2014 14:14:48 +0200 Paolo Bonzini wrote: > Il 24/09/2014 13:48, Igor Mammedov ha scritto: > > it will allow incrementally convert every controller that > > creates SCSI bus and supports hotplug to hotplug controller API > > > > Signed-off-by: Igor Mammedov > > --- > > hw/scsi/scsi-bus.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c > > index 954c607..33495b6 100644 > > --- a/hw/scsi/scsi-bus.c > > +++ b/hw/scsi/scsi-bus.c > > @@ -92,7 +92,7 @@ void scsi_bus_new(SCSIBus *bus, size_t bus_size, DeviceState *host, > > qbus_create_inplace(bus, bus_size, TYPE_SCSI_BUS, host, bus_name); > > bus->busnr = next_scsi_bus++; > > bus->info = info; > > - bus->qbus.allow_hotplug = 1; > > + qbus_set_hotplug_handler(BUS(bus), host, &error_abort); > > } > > > > static void scsi_dma_restart_bh(void *opaque) > > > > Hmm, what if the host is not a HotplugHandler? Then you should just do > nothing for plug, and object_unparent for unplug. Is that broken by > this patch? It will break with 24/30. I'll respin with all not yet converted HBAs implementing HotplugHandler interface with simple unplug callback. > > Paolo >