[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [FOR 0.12 PATCH 3/4] scsi: fix drive hotplug.
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [FOR 0.12 PATCH 3/4] scsi: fix drive hotplug. |
Date: |
Thu, 10 Dec 2009 11:11:07 +0100 |
This patch fills the DriveInfo->unit after hotplugging a scsi disk.
It makes a difference when auto-assigning a scsi id, where unit was
left filled with '-1' instead of the actual scsi id.
With this patch applied the the drive naming logic in drive_init() works
as good as it did in previous releases. Which means it works fine with
a single scsi bus.
Signed-off-by: Gerd Hoffmann <address@hidden>
---
hw/pci-hotplug.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c
index 7e5c51d..9e8e6ed 100644
--- a/hw/pci-hotplug.c
+++ b/hw/pci-hotplug.c
@@ -93,6 +93,7 @@ static int scsi_hot_add(DeviceState *adapter, DriveInfo
*dinfo, int printinfo)
*/
dinfo->unit = qemu_opt_get_number(dinfo->opts, "unit", -1);
scsidev = scsi_bus_legacy_add_drive(scsibus, dinfo, dinfo->unit);
+ dinfo->unit = scsidev->id;
if (printinfo)
qemu_error("OK bus %d, unit %d\n", scsibus->busnr, scsidev->id);
--
1.6.5.2
- [Qemu-devel] Re: [FOR 0.12 PATCH 2/4] pci: don't hw_error() when no slot is available., (continued)
- [Qemu-devel] Re: [FOR 0.12 PATCH 2/4] pci: don't hw_error() when no slot is available., Michael S. Tsirkin, 2009/12/10
- [Qemu-devel] Re: [FOR 0.12 PATCH 2/4] pci: don't hw_error() when no slot is available., Gerd Hoffmann, 2009/12/10
- [Qemu-devel] Re: [FOR 0.12 PATCH 2/4] pci: don't hw_error() when no slot is available., Michael S. Tsirkin, 2009/12/10
- Re: [Qemu-devel] Re: [FOR 0.12 PATCH 2/4] pci: don't hw_error() when no slot is available., Gleb Natapov, 2009/12/10
- Re: [Qemu-devel] Re: [FOR 0.12 PATCH 2/4] pci: don't hw_error() when no slot is available., Michael S. Tsirkin, 2009/12/10
- Re: [Qemu-devel] Re: [FOR 0.12 PATCH 2/4] pci: don't hw_error() when no slot is available., Gleb Natapov, 2009/12/10
- Re: [Qemu-devel] Re: [FOR 0.12 PATCH 2/4] pci: don't hw_error() when no slot is available., Michael S. Tsirkin, 2009/12/11
- Re: [Qemu-devel] Re: [FOR 0.12 PATCH 2/4] pci: don't hw_error() when no slot is available., Gleb Natapov, 2009/12/11
- Re: [Qemu-devel] Re: [FOR 0.12 PATCH 2/4] pci: don't hw_error() when no slot is available., Alexander Graf, 2009/12/10
[Qemu-devel] [FOR 0.12 PATCH 1/4] pci: don't abort() when trying to hotplug with acpi off., Gerd Hoffmann, 2009/12/10
[Qemu-devel] [FOR 0.12 PATCH 3/4] scsi: fix drive hotplug.,
Gerd Hoffmann <=
[Qemu-devel] [FOR 0.12 PATCH 4/4] QemuOpts: allow larger option values., Gerd Hoffmann, 2009/12/10
[Qemu-devel] Re: [FOR 0.12 PATCH 0/4] misc bugfixes, Michael S. Tsirkin, 2009/12/10