From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37962) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UH9hM-0003AI-JI for qemu-devel@nongnu.org; Sun, 17 Mar 2013 05:16:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UH9hJ-00042V-GM for qemu-devel@nongnu.org; Sun, 17 Mar 2013 05:16:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:17765) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UH9hJ-00042J-9V for qemu-devel@nongnu.org; Sun, 17 Mar 2013 05:16:09 -0400 Date: Sun, 17 Mar 2013 11:16:21 +0200 From: "Michael S. Tsirkin" Message-ID: <20130317091621.GA30427@redhat.com> References: <1363311916-23121-1-git-send-email-asias@redhat.com> <1363311916-23121-2-git-send-email-asias@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1363311916-23121-2-git-send-email-asias@redhat.com> Subject: Re: [Qemu-devel] [PATCH 1/2] virtio-scsi: Set _DRIVER_OK flag before scsi target scanning List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Asias He Cc: target-devel@vger.kernel.org, kvm@vger.kernel.org, seabios@seabios.org, qemu-devel@nongnu.org, Nicholas Bellinger , virtualization@lists.linux-foundation.org, Kevin O'Connor , Stefan Hajnoczi , Paolo Bonzini 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 > Acked-by: Paolo Bonzini Acked-by: Michael S. Tsirkin > --- > 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