[SLOF] [PATCH v2 05/19] virtio-{blk, 9p}: enable resetting the device
Thomas Huth
thuth at redhat.com
Thu Jan 21 00:22:18 AEDT 2016
On 20.01.2016 13:10, Nikunj A Dadhania wrote:
> With the lack of the virtio_queue_init_vq routine, driver like
> virtio-blk and virtio-9p had disabled device reset in the
> initialization code. This helper will fix that problem, as the
> initialization can be done after the device reset.
>
> Signed-off-by: Nikunj A Dadhania <nikunj at linux.vnet.ibm.com>
> ---
> lib/libvirtio/virtio-9p.c | 6 +-----
> lib/libvirtio/virtio-blk.c | 5 +----
> 2 files changed, 2 insertions(+), 9 deletions(-)
>
> diff --git a/lib/libvirtio/virtio-9p.c b/lib/libvirtio/virtio-9p.c
> index 81cedb9..2d1d3f5 100644
> --- a/lib/libvirtio/virtio-9p.c
> +++ b/lib/libvirtio/virtio-9p.c
> @@ -175,11 +175,7 @@ int virtio_9p_init(struct virtio_device *dev, void *tx_buf, void *rx_buf,
> dprintf("%s : device at %p\n", __func__, dev->base);
> dprintf("%s : type is %04x\n", __func__, dev->type);
>
> - /* Reset device */
> - // XXX That will clear the virtq base. We need to move
> - // initializing it to here anyway
> - //
> - // virtio_reset_device(dev);
> + virtio_reset_device(dev);
>
> /* Acknowledge device. */
> virtio_set_status(dev, VIRTIO_STAT_ACKNOWLEDGE);
> diff --git a/lib/libvirtio/virtio-blk.c b/lib/libvirtio/virtio-blk.c
> index 28d9c29..1966721 100644
> --- a/lib/libvirtio/virtio-blk.c
> +++ b/lib/libvirtio/virtio-blk.c
> @@ -32,10 +32,7 @@ virtioblk_init(struct virtio_device *dev)
> int features;
>
> /* Reset device */
> - // XXX That will clear the virtq base. We need to move
> - // initializing it to here anyway
> - //
> - // virtio_reset_device(dev);
> + virtio_reset_device(dev);
>
> /* Acknowledge device. */
> virtio_set_status(dev, VIRTIO_STAT_ACKNOWLEDGE);
Reviewed-by: Thomas Huth <thuth at redhat.com>
More information about the SLOF
mailing list