From: "Michael S. Tsirkin" <mst@redhat.com>
To: Asias He <asias@redhat.com>
Cc: target-devel@vger.kernel.org, kvm@vger.kernel.org,
seabios@seabios.org, qemu-devel@nongnu.org,
virtualization@lists.linux-foundation.org,
Kevin O'Connor <kevin@koconnor.net>,
Stefan Hajnoczi <stefanha@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH 1/2] virtio-scsi: Set _DRIVER_OK flag before scsi target scanning
Date: Sun, 17 Mar 2013 11:16:21 +0200 [thread overview]
Message-ID: <20130317091621.GA30427@redhat.com> (raw)
In-Reply-To: <1363311916-23121-2-git-send-email-asias@redhat.com>
On Fri, Mar 15, 2013 at 09:45:15AM +0800, Asias He wrote:
> 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>
Acked-by: Michael S. Tsirkin <mst@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-17 9:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-15 1:45 [PATCH 0/2] Fix booting tcm_vhost + seabios Asias He
2013-03-15 1:45 ` [PATCH 1/2] virtio-scsi: Set _DRIVER_OK flag before scsi target scanning Asias He
2013-03-17 9:16 ` Michael S. Tsirkin [this message]
2013-03-15 1:45 ` [PATCH 2/2] virtio-scsi: Pack struct virtio_scsi_{req_cmd,resp_cmd} Asias He
2013-03-15 8:15 ` [PATCH 2/2] virtio-scsi: Pack struct virtio_scsi_{req_cmd, resp_cmd} Paolo Bonzini
2013-03-17 9:16 ` [PATCH 2/2] virtio-scsi: Pack struct virtio_scsi_{req_cmd,resp_cmd} Michael S. Tsirkin
2013-03-17 14:28 ` [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=20130317091621.GA30427@redhat.com \
--to=mst@redhat.com \
--cc=asias@redhat.com \
--cc=kevin@koconnor.net \
--cc=kvm@vger.kernel.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).