From: fred.konrad@greensocs.com
To: aliguori@us.ibm.com, qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, mark.burton@greensocs.com,
agraf@suse.de, amit.shah@redhat.com, cornelia.huck@de.ibm.com,
pbonzini@redhat.com, afaerber@suse.de, fred.konrad@greensocs.com
Subject: [Qemu-devel] [PATCH for-1.5 3/4] scsi: add scsi_named_bus_new().
Date: Mon, 29 Apr 2013 17:12:44 +0200 [thread overview]
Message-ID: <1367248365-27260-4-git-send-email-fred.konrad@greensocs.com> (raw)
In-Reply-To: <1367248365-27260-1-git-send-email-fred.konrad@greensocs.com>
From: KONRAD Frederic <fred.konrad@greensocs.com>
This add the possibility to create a scsi-bus with a specified name.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
---
hw/scsi/scsi-bus.c | 12 +++++++++---
include/hw/scsi/scsi.h | 2 ++
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c
index 6239ee1..0364749 100644
--- a/hw/scsi/scsi-bus.c
+++ b/hw/scsi/scsi-bus.c
@@ -71,15 +71,21 @@ static void scsi_device_unit_attention_reported(SCSIDevice *s)
}
}
-/* Create a scsi bus, and attach devices to it. */
-void scsi_bus_new(SCSIBus *bus, DeviceState *host, const SCSIBusInfo *info)
+void scsi_named_bus_new(SCSIBus *bus, DeviceState *host,
+ const SCSIBusInfo *info, const char *bus_name)
{
- qbus_create_inplace(&bus->qbus, TYPE_SCSI_BUS, host, NULL);
+ qbus_create_inplace(&bus->qbus, TYPE_SCSI_BUS, host, bus_name);
bus->busnr = next_scsi_bus++;
bus->info = info;
bus->qbus.allow_hotplug = 1;
}
+/* Create a scsi bus, and attach devices to it. */
+void scsi_bus_new(SCSIBus *bus, DeviceState *host, const SCSIBusInfo *info)
+{
+ scsi_named_bus_new(bus, host, info, NULL);
+}
+
static void scsi_dma_restart_bh(void *opaque)
{
SCSIDevice *s = opaque;
diff --git a/include/hw/scsi/scsi.h b/include/hw/scsi/scsi.h
index 3bda1c4..ddcb07c 100644
--- a/include/hw/scsi/scsi.h
+++ b/include/hw/scsi/scsi.h
@@ -153,6 +153,8 @@ struct SCSIBus {
};
void scsi_bus_new(SCSIBus *bus, DeviceState *host, const SCSIBusInfo *info);
+void scsi_named_bus_new(SCSIBus *bus, DeviceState *host,
+ const SCSIBusInfo *info, const char *bus_name);
static inline SCSIBus *scsi_bus_from_device(SCSIDevice *d)
{
--
1.8.1.4
next prev parent reply other threads:[~2013-04-29 15:13 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-29 15:12 [Qemu-devel] [PATCH for-1.5 0/4] virtio: fix bus command line compatibility fred.konrad
2013-04-29 15:12 ` [Qemu-devel] [PATCH for-1.5 1/4] virtio-x-bus: force bus name to virtio-bus fred.konrad
2013-04-29 15:12 ` [Qemu-devel] [PATCH for-1.5 2/4] virtio-serial: fix command line compatibility fred.konrad
2013-04-29 15:45 ` Paolo Bonzini
2013-04-29 15:12 ` fred.konrad [this message]
2013-04-29 15:40 ` [Qemu-devel] [PATCH for-1.5 3/4] scsi: add scsi_named_bus_new() Paolo Bonzini
2013-04-29 16:15 ` KONRAD Frédéric
2013-04-29 15:12 ` [Qemu-devel] [PATCH for-1.5 4/4] virtio-scsi: fix the command line compatibility fred.konrad
2013-04-29 15:44 ` Paolo Bonzini
2013-04-29 16:28 ` KONRAD Frédéric
2013-04-29 16:32 ` Paolo Bonzini
2013-04-29 17:39 ` KONRAD Frédéric
2013-04-29 17:55 ` Andreas Färber
2013-04-29 18:17 ` KONRAD Frédéric
2013-04-30 13:06 ` KONRAD Frédéric
2013-04-30 14:01 ` Paolo Bonzini
2013-04-30 14:15 ` KONRAD Frédéric
2013-04-30 14:17 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1367248365-27260-4-git-send-email-fred.konrad@greensocs.com \
--to=fred.konrad@greensocs.com \
--cc=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=aliguori@us.ibm.com \
--cc=amit.shah@redhat.com \
--cc=cornelia.huck@de.ibm.com \
--cc=mark.burton@greensocs.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).