[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 21/30] scsi: make scsi_bus_new() assign hotplug
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 21/30] scsi: make scsi_bus_new() assign hotplug controller |
Date: |
Wed, 24 Sep 2014 14:14:48 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 |
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 <address@hidden>
> ---
> 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?
Paolo
- Re: [Qemu-devel] [PATCH 15/30] virtio-pci: replace BusState.allow_hotplug with hotplug_handler, (continued)
[Qemu-devel] [PATCH 17/30] virtio-mmio: drop useless bus->allow_hotplug = 0, Igor Mammedov, 2014/09/24
[Qemu-devel] [PATCH 18/30] s390x: drop not used allow_hotplug in event-facility, Igor Mammedov, 2014/09/24
[Qemu-devel] [PATCH 19/30] s390x: convert s390-virtio to hotplug handler API, Igor Mammedov, 2014/09/24
[Qemu-devel] [PATCH 20/30] s390x: convert virtio-ccw to hotplug handler API, Igor Mammedov, 2014/09/24
[Qemu-devel] [PATCH 21/30] scsi: make scsi_bus_new() assign hotplug controller, Igor Mammedov, 2014/09/24
[Qemu-devel] [PATCH 22/30] scsi: convert pvscsi HBA to hotplug hander API, Igor Mammedov, 2014/09/24
[Qemu-devel] [PATCH 23/30] scsi: convert virtio-scsi HBA to hotplug handler API, Igor Mammedov, 2014/09/24
[Qemu-devel] [PATCH 24/30] scsi: cleanup not used anymore SCSIBusInfo{hotplug, hot_unplug} fields, Igor Mammedov, 2014/09/24
[Qemu-devel] [PATCH 25/30] usb-bot: drop not needed "allow_hotplug = 0", Igor Mammedov, 2014/09/24