From: Asias He <asias@redhat.com>
To: seabios@seabios.org
Cc: target-devel@vger.kernel.org, kvm@vger.kernel.org,
"Michael S. Tsirkin" <mst@redhat.com>,
qemu-devel@nongnu.org, Nicholas Bellinger <nab@linux-iscsi.org>,
virtualization@lists.linux-foundation.org,
Kevin O'Connor <kevin@koconnor.net>,
Stefan Hajnoczi <stefanha@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>, Asias He <asias@redhat.com>
Subject: [Qemu-devel] [PATCH 1/2] virtio-scsi: Set _DRIVER_OK flag before scsi target scanning
Date: Fri, 15 Mar 2013 09:45:15 +0800 [thread overview]
Message-ID: <1363311916-23121-2-git-send-email-asias@redhat.com> (raw)
In-Reply-To: <1363311916-23121-1-git-send-email-asias@redhat.com>
Before we start scsi target scanning, we need to set the
VIRTIO_CONFIG_S_DRIVER_OK flag so the device can do setup properly.
This fix a bug when booting tcm_vhost with seabios.
Signed-off-by: Asias He <asias@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
---
src/virtio-scsi.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/virtio-scsi.c b/src/virtio-scsi.c
index 879ddfb..4de1255 100644
--- a/src/virtio-scsi.c
+++ b/src/virtio-scsi.c
@@ -147,6 +147,9 @@ init_virtio_scsi(struct pci_device *pci)
goto fail;
}
+ vp_set_status(ioaddr, VIRTIO_CONFIG_S_ACKNOWLEDGE |
+ VIRTIO_CONFIG_S_DRIVER | VIRTIO_CONFIG_S_DRIVER_OK);
+
int i, tot;
for (tot = 0, i = 0; i < 256; i++)
tot += virtio_scsi_scan_target(pci, ioaddr, vq, i);
@@ -154,8 +157,6 @@ init_virtio_scsi(struct pci_device *pci)
if (!tot)
goto fail;
- vp_set_status(ioaddr, VIRTIO_CONFIG_S_ACKNOWLEDGE |
- VIRTIO_CONFIG_S_DRIVER | VIRTIO_CONFIG_S_DRIVER_OK);
return;
fail:
--
1.8.1.4
next prev parent reply other threads:[~2013-03-15 1:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-15 1:45 [Qemu-devel] [PATCH 0/2] Fix booting tcm_vhost + seabios Asias He
2013-03-15 1:45 ` Asias He [this message]
2013-03-17 9:16 ` [Qemu-devel] [PATCH 1/2] virtio-scsi: Set _DRIVER_OK flag before scsi target scanning Michael S. Tsirkin
2013-03-15 1:45 ` [Qemu-devel] [PATCH 2/2] virtio-scsi: Pack struct virtio_scsi_{req_cmd, resp_cmd} Asias He
2013-03-15 8:15 ` Paolo Bonzini
2013-03-17 9:16 ` Michael S. Tsirkin
2013-03-17 14:28 ` [Qemu-devel] [PATCH 0/2] Fix booting tcm_vhost + seabios Kevin O'Connor
2013-03-18 21:26 ` Nicholas A. Bellinger
2013-03-19 0:58 ` Asias He
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=1363311916-23121-2-git-send-email-asias@redhat.com \
--to=asias@redhat.com \
--cc=kevin@koconnor.net \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
--cc=nab@linux-iscsi.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=seabios@seabios.org \
--cc=stefanha@redhat.com \
--cc=target-devel@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.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).